29.08.2014, 13:55
pawn Код:
CMD:stats(playerid, params[])
{
new id;
if(sscanf(params, "u", id)) return SendClientMessage(playerid, -1,"{ff0000}Error: {ffffff}Correct usage: /stats (playerid)");
if(!IsPlayerConnected(playerid)) return SCM(playerid, -1, "{ff0000}Error: {ffffff}That Player Is Not Connected");
new string[128];
format(string, sizeof(string), "{f7ea00}~~~~~~~~%s(%d)~~~~~~~ \n {ff0000}Kills: {00ff19}%d \n {ff0000}Deaths: {00ff19}%d \n {ff0000}Death Racing Won: {00ff19}%d \n {ff0000}Duels Won: {00ff19}%d \n {ff0000}Kill/Death Ratio: {00ff19}%d", GetName(id), id, Kills[id], Deaths[id], DerbyWon[id], DuelWon[id], Kills[id]/Deaths[id]);
ShowPlayerDialog(playerid, stats, DIALOG_STYLE_MSGBOX, "{f7ea00}Player Statistics:", string, "Okay", "");
return 1;
}
Then when i type /stats (id) it says Invalid command! Any idea why? This is happening with all commands I'm adding, though other commmands in the script are working as they should!
Any idea what is causing all this? The other commands in the same script are working fine. Other commands are made by me too, but every command I add now has the same problem