SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 04/05/2014, 10:41 AM   #1
zohartrejx
Huge Clucker
 
zohartrejx's Avatar
 
Join Date: Jun 2012
Location: Slovenia
Posts: 235
Reputation: 30
Default /stats command

Can someone help me with /stats command?
Currently i have
Quote:
enum pInfo
{
pAdminLevel,
pCash,
pScore,
}
Can someone tell me how to do /stats command so it'll show Adminlevel , cash and score?
Please don't use ZCMD or others, normal one.
Thanks all
__________________
••Scripting - LEFT.••
-Cops VS Prisioners 1.3 - OUTDATED + NO MORE SCRIPTING.
-Cops VS Prisioners GM can be found on Hosted Tab, it's edited version of mine so do not contact me about it.
P.S You can take my Gamemodes, just use my credits.
(Only helping with scripting, left scripting but if you need help, you can contact me, no problem.)



••••••••••John Ridar / zohartrejx••••••••••
zohartrejx is offline   Reply With Quote
Old 04/05/2014, 10:49 AM   #2
PrivatioBoni
Gangsta
 
Join Date: May 2013
Location: Ya
Posts: 961
Reputation: 162
Default Re: /stats command

pawn Code:
new admin = PlayerInfo[playerid][pAdminLevel];
new cash = PlayerInfo[playerid][pCash];
new score = PlayerInfo[playerid][pScore];


new stats[144];
format(stats,sizeof(stats),"Admin: %i | Cash: $%i | Score: %i |",admin,cash,score);
SendClientMessage(playerid, COLOR_WHITE, stats);

Should be OK. Untested.
PrivatioBoni is offline   Reply With Quote
Old 04/05/2014, 10:51 AM   #3
Ghazal
Gangsta
 
Ghazal's Avatar
 
Join Date: Oct 2013
Location: Egypt
Posts: 523
Reputation: 167
Default Re: /stats command

Maybe something like this?
Code:
CMD:stats(playerid,params[])
{
new id = playerid;
if(!isnull(params)) id = strval(params);
format(megastr, sizeof(megastr, "Name: %s /n Score: %i/n Cash: %i/nAdminLevel: %i",PlayerName(id),GetPlayerScore(id),PlayerInfo[id][pCash],PlayerInfo[id][pAdmin]);
ShowPlayerDialog(playerid, DIALOG_TEXT, DIALOG_STYLE_MSGBOX, "COL_YELLOW"" Player Stats", megastr, "Close", "");
return 1;
}
__________________
Ghazal is offline   Reply With Quote
Old 04/05/2014, 12:04 PM   #4
zohartrejx
Huge Clucker
 
zohartrejx's Avatar
 
Join Date: Jun 2012
Location: Slovenia
Posts: 235
Reputation: 30
Default Re: /stats command

Thanks!
__________________
••Scripting - LEFT.••
-Cops VS Prisioners 1.3 - OUTDATED + NO MORE SCRIPTING.
-Cops VS Prisioners GM can be found on Hosted Tab, it's edited version of mine so do not contact me about it.
P.S You can take my Gamemodes, just use my credits.
(Only helping with scripting, left scripting but if you need help, you can contact me, no problem.)



••••••••••John Ridar / zohartrejx••••••••••
zohartrejx is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can my /stats command be modified to show more stats? K9IsGodly Scripting Help 3 13/04/2014 05:48 PM
/stats command isnt updating the stats efrim123 Scripting Help 3 15/10/2013 09:40 AM
About stats command.... (need help) Scrillex Scripting Help 15 25/02/2013 09:28 PM
STATS command. Bug. Scripting Help 11 27/10/2012 03:12 PM
/stats command Jonni8 Help Archive 7 06/06/2010 08:21 PM


All times are GMT. The time now is 06:31 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.