i had like wat the fuck?
#9

You used playerid in sscanf but for commands player1 o.O just remove playerid and put player1 in sscanf like the below

PHP код:
IRCCMD:ban(botidchannel[], user[], host[], params[]) 

    
// Check if the user is at least an op in the channel 
    
if (IRC_IsOp(botidchanneluser)) 
    { 
        new 
player1,reason[64]; 
        
// Check if the user at least entered a player ID 
        
if (sscanf(params"dS(No reason)[64]"player1reason)) 
        { 
            return 
1
        } 
        
// Check if the player is connected 
        
if (IsPlayerConnected(player1)) 
        { 
            
// Echo the formatted message 
            
new msg[128], name[MAX_PLAYER_NAME]; 
            
GetPlayerName(player1namesizeof(name)); 
            
format(msgsizeof(msg), "02*** %s has been banned by %s on IRC. (%s)"nameuserreason); 
            
IRC_GroupSay(groupIDchannelmsg); 
            
format(msgsizeof(msg), "*** %s has been banned by %s on IRC. (%s)"nameuserreason); 
            
SendClientMessageToAll(0x0000FFFFmsg); 
            
// Ban the player 
            
BanEx(player1reason); 
        } 
    } 
    return 
1
}  
IRCCMD:slap(botidchannel[], user[], host[], params[]) 

        new 
player1reason[64]; 
        
//Playerid 
        
if (sscanf(params"dS(No reason.)[64]"player1reason)) 
        { 
                return 
1
        } 
    if (
IRC_IsVoice(botidchanneluser)) 
        { 
                if(
IsPlayerConnected(player1)) 
                { 
                        new 
msg[128], pname[MAX_PLAYER_NAME]; 
                        
GetPlayerName(player1pnamesizeof(pname)); 
                        
format(msgsizeof(msg), "*** %s has been slapped by Staff Member %s on IRC for reason: %s"pnameuserreason); 
                        
IRC_GroupSay(groupIDchannelmsg); 
                        
format(msgsizeof(msg), "*** %s has been slapped by Staff Member %s on IRC for reason: %s"pnameuserreason); 
                        
SendClientMessageToAll(0xFF0000C8msg); 
                        new 
Float:Health
                        new 
Float:xFloat:yFloat:z
                        
GetPlayerHealth(player1,Health); 
                        
SetPlayerHealth(player1,Health-25); 
                        
GetPlayerPos(player1,x,y,z); 
                        
SetPlayerPos(player1,x,y,z+7); 
                        
PlayerPlaySound(player1,1190,0.0,0.0,0.0); 
                } 
        } 
        return 
1

Reply


Messages In This Thread
i had like wat the fuck? - by MojorX - 19.10.2015, 17:23
Re: i had like wat the fuck? - by Sudaisx - 19.10.2015, 17:29
Re: i had like wat the fuck? - by MojorX - 19.10.2015, 17:32
Re: i had like wat the fuck? - by MojorX - 19.10.2015, 19:54
Re: i had like wat the fuck? - by kristo - 19.10.2015, 19:59
Re: i had like wat the fuck? - by MojorX - 20.10.2015, 04:51
Re: i had like wat the fuck? - by jlalt - 20.10.2015, 05:14
Re: i had like wat the fuck? - by MojorX - 20.10.2015, 16:19
Re: i had like wat the fuck? - by jlalt - 21.10.2015, 05:26

Forum Jump:


Users browsing this thread: 1 Guest(s)