Problem with my kick command
#4

Look in your codes the variable "reason" should be a string try the following codes
PHP код:
CMD:kick(playeridparams[]) 

    if(
pInfo[playerid][pAdmin] <= 1
        return 
SendClientMessage(playeridGREY"You are not authorized to use that command."); 
    new 
        
targetid
        
reason[24], 
        
str[128
    ; 
    if(
sscanf(params"us[24]"targetidreason)) 
        return 
SendClientMessage(playeridGREY"USAGE: /kick [playerid] [reason]"); 
    if(!
IsPlayerConnected(targetid)) 
        return 
SendClientMessage(playeridGREY"Player is not connected"); 
    new 
        
pname[MAX_PLAYER_NAME], 
        
tname[MAX_PLAYER_NAME
    ; 
    
GetPlayerName(playeridpnamesizeof(pname)); 
    
GetPlayerName(targetidtnamesizeof(tname)); 
    
format(strsizeof(str), "You have been kicked by %s. REASON: %s"pnamereason); 
    
SendClientMessage(targetidLIGHTBLUEstr); 
    
format(strsizeof(str), "You have kicked %s REASON: %s."tnamereason); 
    
SendClientMessage(playeridLIGHTBLUEstr); 
    
SetTimerEx("KickPlayer"100false"i"targetid); 
    return 
1

Reply


Messages In This Thread
Problem with my kick command - by iCurse - 18.04.2016, 14:24
Re: Problem with my kick command - by iCurse - 18.04.2016, 14:26
Re: Problem with my kick command - by Saliim - 18.04.2016, 15:04
Re: Problem with my kick command - by SyS - 18.04.2016, 15:10
Re: Problem with my kick command - by Threshold - 18.04.2016, 15:21
Re: Problem with my kick command - by AdrianG - 20.04.2016, 00:45
Re: Problem with my kick command - by Ritzy2K - 20.04.2016, 06:16

Forum Jump:


Users browsing this thread: 2 Guest(s)