Ban command
#9

Quote:
Originally Posted by Hunud
Посмотреть сообщение
This dont work same problem
the code provided by oMa should work as per my analysis you might doing something wrong somewhere just do a debug
like this add some debugging in that code
PHP код:
CMD:ban(playeridparams[]) 

    if(
pInfo[playerid][AL] < 2) return SCM(playeridred"[ERROR] No allow!"); 
    { 
        new 
PID;  
        new 
reason[64];  
        new 
str[128];  
        new 
Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME];  
        if(
sscanf(params"us[64]"PID,reason)) return SCM(playeridred"[U]: /ban playerid) reason)");  
        if(!
IsPlayerConnected(PID)) return SCM(playerid, -1"[ERROR]: no player!"); 
        
printf("all condition passed");
        
GetPlayerName(playeridAdminnamesizeof(Adminname));  
        
GetPlayerName(PIDPlayernamesizeof(Playername)); 
        
printf("user =%s target=%s",Adminname,Playername);
        
format(strsizeof(str), "%s has been banned by Administrator %s Reason: %s"PlayernameAdminnamereason); 
        
SCMToAll(-1str);  
        
printf("message = %s",str);
        
Ban(PID); 
    } 
    
printf("out of if");
    return 
1

post what is displaying on server log now.
Reply


Messages In This Thread
Ban command - by Hunud - 30.09.2016, 13:55
Re: Ban command - by oMa37 - 30.09.2016, 13:59
Re: Ban command - by Hunud - 30.09.2016, 14:02
Re: Ban command - by oMa37 - 30.09.2016, 14:04
Re: Ban command - by Hunud - 30.09.2016, 14:06
Re: Ban command - by oMa37 - 30.09.2016, 14:13
Re: Ban command - by Gotham - 30.09.2016, 14:18
Re: Ban command - by Hunud - 30.09.2016, 14:22
Re: Ban command - by SyS - 30.09.2016, 15:26
Re: Ban command - by MEW273 - 30.09.2016, 15:29

Forum Jump:


Users browsing this thread: 2 Guest(s)