05.06.2012, 08:52
Hello,
I have returned to scripting after about 6 months and I'm having trouble with this one code,
The problem is, is that it is returning "SERVER: Unknown Command".
If I type /setlevel, I will get the message "Error", it is just when I fill out the id and level parameters I get the Unknown Command error.
Any help would be appreciated, thanks.
I have returned to scripting after about 6 months and I'm having trouble with this one code,
pawn Код:
dcmd_setlevel(playerid,params[])
{
new str[128],level; new name[24], id;
if(sscanf(params,"ui",id,level))
return SendClientMessage(playerid,WHITE,"Error.");
GetPlayerName(id,name,24);
PlayerInfo[id][Level] = level;
UpdatePlayerFile(playerid);
format(str,sizeof(str),"Admin %s has set your level to %d",name,level);
SendClientMessage(id,WHITE,str);
return 1;
}
If I type /setlevel, I will get the message "Error", it is just when I fill out the id and level parameters I get the Unknown Command error.
Any help would be appreciated, thanks.