10.12.2014, 12:25
try this
pawn Код:
CMD:setlevel(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return true;
new mysql_query[128], lookupid, level;
if(sscanf(params,"ui",lookupid ,level)) return SendClientMessage(playerid, COLOR_YELLOW, "use: /setlevel [PlayerName/ID] [level]");
if(!IsPlayerConnected(GetPlayerID(lookupid))) return SendClientMessage(playerid, -1, "that player is not connected");
PlayerInfo[lookupid][pAdminLevel] = level;
format(mysql_query, sizeof(mysql_query), "UPDATE `accounts` SET `pAdmin` = '%d' WHERE `id` = '%d'",level, GetPlayerID(lookupid));
mysql_function_query(connects, mysql_query, false, "", "");
return true;
}