Help dcmd /setadmin ID LEVEL
#1

Hello All,
I need to create a command /setadmin ID LEVEL
What I did:
pawn Код:
dcmd_setadmin(playerid,params[])
{
if(PlayerInfo[playerid][admin]>=8 || IsPlayerAdmin(playerid))
{
new id,livello;
id = strval(params);
if(!strlen(params)) return SendClientMessage(playerid, COLOR_RED, "Uso /setadmin [ID] [LIVELLO]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "Giocatore non connesso.");
livello = strval(params);
format(astring,sizeof(astring),"[ADMIN]: L'Admin %s ha settato %s livello %d.",Nome(playerid),Nome(id),livello);
SendClientMessageToAll(COLORE_MESSAGGI,astring);

PlayerInfo[id][admin]=livello;
} else { SendClientMessage(playerid, COLOR_RED, "Devi essere minimo admin livello 8 per usare questo comando!"); }
return 1;
}
The problem is that the id of the player and the level are the same ie I can not share with the ID LEVEL
Sorry for my English, I used a translator xD
Reply


Messages In This Thread
Help dcmd /setadmin ID LEVEL - by ReVo_ - 31.12.2009, 16:41
Re: Help dcmd /setadmin ID LEVEL - by GATOSSSSSSS - 31.12.2009, 17:10
Re: Help dcmd /setadmin ID LEVEL - by Calon - 01.01.2010, 02:27

Forum Jump:


Users browsing this thread: 3 Guest(s)