Command not working correct!
#3

Try This :c
PHP Code:
CMD:kick(playerid,params[])
{
   if(
P_Data[playerid][pAdmin] >= 1)
  {
    new 
PID//define the playerid we wanna kick
    
new reason[64];
    new global[
90];
    new 
local[91];
    new 
Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME];
    
GetPlayerName(playeridAdminnamesizeof(Adminname));
    
GetPlayerName(PIDPlayernamesizeof(Playername));
    if(
sscanf(params"us[64]"PID,reason)) return SendClientMessage(playeridCOLOR_WHITE"Folosire: /kick [playerid] [reason]");
    if(!
IsPlayerConnected(PID)) return SendClientMessage(playerid, -1"{FF0000}Eroare: Player-ul nu este online!");
    if(
P_Data[PID][pAdmin] >= P_Data[playerid][pAdmin]) return SendClientMessage(playerid, -1"{FF0000}Eroare: Nu poti da kick la admini cu level mai mare sau egal cu al tau!");
    
format(localsizeof(local), "{FF0000}Ai luat kick de la %s. Motiv: %s"GetName(playerid), reason);
    
SendClientMessage(PID, -1local);
    
format(global, sizeof(global(, "{FF0000}AdminBot: %s a luat kick de la %s pe motivul: %s"GetName(PID), GetName(playerid), reason);
    
SendClientMessageToAll(-1, global);
    return 
Kick(PID);
  }
  else
  {
  
SendClientMessage(playerid, -1"{FF0000}Eroare: Nu ai admin!");
  }
   return 
1;

Reply


Messages In This Thread
Command not working correct! - by andreistalker - 08.08.2015, 16:58
Re: Command not working correct! - by andreistalker - 08.08.2015, 17:02
Re: Command not working correct! - by jlalt - 08.08.2015, 17:26
Re: Command not working correct! - by XBrianX - 09.08.2015, 21:37
Re: Command not working correct! - by jlalt - 09.08.2015, 21:39
Re: Command not working correct! - by XBrianX - 09.08.2015, 21:43
Re: Command not working correct! - by jlalt - 09.08.2015, 21:45
Re: Command not working correct! - by XBrianX - 09.08.2015, 21:47

Forum Jump:


Users browsing this thread: 2 Guest(s)