27.12.2016, 13:56
Hey guys, When ever i use that command it doesn't work Why
PHP код:
CMD:setolevel(playerid, params[])
{
new lookupid,level,name[MAX_PLAYER_NAME],string[143];
if(pData[playerid][Admin] >= 9)
{
if(sscanf(params,"ud",lookupid,level)) return SendClientMessage(playerid, COLOR_YELLOW, "Usage: /setolevel (Name on database) (level)");
if(level < 1 ||level > 10) return SendClientMessage(playerid, -1, "1 to 10 levels"); // you can change this to any level you want
mysql_format(mysql,string, sizeof(string), "UPDATE `players` SET level = %d WHERE username = '%s'",level,name);
mysql_tquery(mysql, string, "", "");
}
else return SendClientMessage(playerid, COLOR_YELLOW, "Only +level 9 can use this command");
return 1;
}