Stats help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Stats help (
/showthread.php?tid=412990)
Stats help -
Noles2197 - 03.02.2013
'Style' is the player's fight style and I want it to show up in the stats like, "Fight style: Boxing"
The number saved for the boxing fight style is '5'.
pawn Код:
enum PlayerInfo
{
Style,
Cigar,
Cash
}
pawn Код:
CMD:stats(playerid, params[])
{
new str[128];
format(str,sizeof(str),"Cash: %i - Cigars: %i",pInfo[playerid][Cash],pInfo[playerid][Cigar]);
ShowPlayerDialog(playerid,13,0,"Stats",str,"Close","");
return 1;
}
Re: Stats help -
SKAzini - 03.02.2013
pawn Код:
CMD:stats(playerid, params[])
{
new str[128],fightstyle[40];
switch(pInfo[playerid][Style])
{
case 4: format(fightstyle, sizeof(fightstyle), "Normal");
case 5: format(fightstyle, sizeof(fightstyle), "Boxing");
case 6: format(fightstyle, sizeof(fightstyle), "Kungfu");
case 7: format(fightstyle, sizeof(fightstyle), "Kneehead");
case 15: format(fightstyle, sizeof(fightstyle), "Grabkick");
case 16: format(fightstyle, sizeof(fightstyle), "Elbow");
}
format(str,sizeof(str),"Cash: %i - Cigars: %i - Fightstyle: %s",pInfo[playerid][Cash],pInfo[playerid][Cigar],fightstyle);
ShowPlayerDialog(playerid,13,0,"Stats",str,"Close","");
return 1;
}