Quote:
Originally Posted by Devilxz97
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/stats", cmdtext, true, 10) == 0) { new DIALOG_STATS; new str[256]; new money; new name; new score; new weapon[32]; new playerweapon; money = PlayerInfo[playerid][pMoney], name = PlayerInfo[playerid][pName], score = PlayerInfo[playerid][pScore], weapon = PlayerInfo[playerid][pWeapon]; GetWeaponName(playerweapon, weapon, sizeof(weapon)); format(str, sizeof(str), "Name:[ %s ]\nMoney: [ %d ]\nScore: [ %d ]\nWeapon: [ %s ]", name,money,score,weapon); ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX , "PlayerStats", str, "Close", ""); return 1; } }
try this . .
|
How did you know he have that weapon enum or not?
And please stop posting random codes from your script.
There was not even need for string sized [256] in your heal command.