Help dcmd command >KICK<
#7

pawn Код:
dcmd_setadmin(playerid,params[])
{
new string[286];
new giveplayerid;
giveplayerid = strval(params);
new amount;
if(AdminLvl[playerid] <=3)
{
SendClientMessage(playerid,COLOR_RED,"You are not allowed to do this");
return 1;
}
if(sscanf(params,"ud",giveplayerid,amount))
{
SendClientMessage(playerid,COLOR_RED,"USAGE:/setadmin [playerid] [amount]");
return 1;
}
if(!IsPlayerConnected(giveplayerid))
{
SendClientMessage(playerid,COLOR_RED,"This player is not connected");
return 1;
}
AdminLvl[giveplayerid] = amount;
GetPlayerName(playerid,playername,sizeof(playername));
format(string,sizeof(string),"Your admin level is setted to %d by %s",amount,playername);
SendClientMessage(giveplayerid,COLOR_RED,string);

GetPlayerName(giveplayerid,playername,sizeof(playername));
format(string,sizeof(string),"You have setted %s his admin level to %d",playername,amount);
SendClientMessage(playerid,COLOR_RED,string);
return 1;
}
Reply


Messages In This Thread
Help dcmd command >KICK< - by DarkPower - 17.07.2010, 10:36
Re: Help dcmd command >KICK< - by Dolph - 17.07.2010, 10:39
Re: Help dcmd command >KICK< - by [XST]O_x - 17.07.2010, 10:39
Re: Help dcmd command >KICK< - by Grim_ - 17.07.2010, 10:40
Re: Help dcmd command >KICK< - by DarkPower - 17.07.2010, 10:44
Re: Help dcmd command >KICK< - by DarkPower - 17.07.2010, 11:00
Re: Help dcmd command >KICK< - by bartje01 - 17.07.2010, 11:06
Re: Help dcmd command >KICK< - by DarkPower - 17.07.2010, 11:12
Re: Help dcmd command >KICK< - by DarkPower - 17.07.2010, 11:15
Re: Help dcmd command >KICK< - by bartje01 - 17.07.2010, 11:33

Forum Jump:


Users browsing this thread: 1 Guest(s)