Help /kick Problem
#2

PHP код:
COMMAND:kick(playerid,params[])
{
    new 
playerid2,PlayerName[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME];
    new 
tmp[256], Indexstring[128], reason[32];
    
tmp strtok(params,Index), playerid2 strval(tmp);
    
GetPlayerName(playerid2,on,sizeof(on));
    
GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
    if(
Account[playerid][Level] < 2) return SendClientMessage(playerid,Yellow,"You need to be level 2 to use this command!");
    if (
sscanf(params"us[64]"playerid2,reason)) return SendClientMessage(playeridYellow"Usage: /kick id reason");
    if(!
IsPlayerConnected(playerid2))return SendClientMessage(playerid,Yellow,"Player is not connected!");
    
format(stringsizeof(string),"Admin %s has kicked %s [Reason: %s]",PlayerNameonreason);
    
SendClientMessageToAll(Bluestring);
    
Kick(playerid2);
    return 
1;

try this
Reply


Messages In This Thread
Help /kick Problem - by ServerScripter - 18.09.2011, 19:59
Re: Help /kick Problem - by =WoR=G4M3Ov3r - 18.09.2011, 20:17
Re: Help /kick Problem - by ServerScripter - 18.09.2011, 20:26

Forum Jump:


Users browsing this thread: 1 Guest(s)