29.06.2014, 01:29
Hello, there is this super weird thing that is happening to me, whenever I write the command /stats I will get the message "SERVER: UNKNOWN COMMAND".
All the other commands in the script works, and I have no idea why this particular command is not working. The includes I use are ZCMD, foreach, Dini and the sscanf2 plugin.
This is the command:
And this is the error I get, I have no idea why:
All the other commands in the script works, and I have no idea why this particular command is not working. The includes I use are ZCMD, foreach, Dini and the sscanf2 plugin.
This is the command:
pawn Code:
CMD:stats(playerid, params[])
{
new str[128], Float:Health, Float:Armour, PlayerDeaths;
GetPlayerHealth(playerid, Health);
GetPlayerArmour(playerid, Armour);
if(Info[playerid][Deaths] == 0) PlayerDeaths = 1;
format(str, 128, "{FFFF00}Health: {FFFFFF}%.2f\nArmour: %.2f\nKills: %d\nDeaths: %d\nKill/Death Ratio: %.2f\nCurrent Killstreak: %d", Health, Armour, Info[playerid][Kills], Info[playerid][Deaths], Info[playerid][Kills]/PlayerDeaths, Info[playerid][KillStreak]);
ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, "{FFFF00}Stats", str, "Close", "");
return 1;
}
