Setlevel mysql
#5

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;
}
Reply


Messages In This Thread
Setlevel mysql - by xStunt - 10.12.2014, 11:38
Re: Setlevel mysql - by CoaPsyFactor - 10.12.2014, 11:45
Re: Setlevel mysql - by xStunt - 10.12.2014, 11:49
Re: Setlevel mysql - by CoaPsyFactor - 10.12.2014, 12:01
Re: Setlevel mysql - by JeaSon - 10.12.2014, 12:25

Forum Jump:


Users browsing this thread: 1 Guest(s)