[HELP!] With /kick and /setlevel CMD please!
#2

I work well?

pawn Код:
CMD:kick(playerid, params[])
{
new id, reason[148];
if(Informacion[playerid][pAdmin] < 3) return SendClientMessage(playerid, COLOR_GREY, "You have to be level 3 to use that command!");
if(sscanf(params, "us[128]", id,reason)) return SendClientMessage(playerid, COLOR_GREY, "USO: /kick [Jugador] [Razon]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_GREY, "Ese jugador no esta conectado!");
format(str, sizeof(str), "'%s' Ha sido kickeado por el administrador '%s'. Razon: %s ", pName(id), pName(playerid), reason);
SendClientMessageToAll(COLOR_RED, str);
Kick(id);
return 1;
}
pawn Код:
CMD:setlevel(playerid,params[])
{
new id,level,string[64];
if(Informacion[playerid][pAdmin] < 3 && IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You have to be level 3 to use that command!");
if(sscanf(params,"ud",id,level)) return SendClientMessage(playerid,COLOR_RED,"[USO]: /setlevel [playerid/name] [level]");
if(level > 10) return SendClientMessage(playerid, COLOR_RED,"solo de 1-10!");
format(string,sizeof string,"RCON Administrator promoted %s to administrator!",pName(id));
SendClientMessageToAll(COLOR_GREEN,string);
return 1;
}
define pName

pawn Код:
stock pName(playerid)
{
  new name[MAX_PLAYER_NAME];
  GetPlayerName(playerid, name, sizeof(name));
  return name;
}
Reply


Messages In This Thread
[HELP!] With /kick and /setlevel CMD please! - by JoelM14 - 23.10.2014, 20:06
Respuesta: [HELP!] With /kick and /setlevel CMD please! - by !R1Ch@rD! - 24.10.2014, 00:01

Forum Jump:


Users browsing this thread: 1 Guest(s)