Issue with kicking players from an event
#10

Quote:
Originally Posted by Yaa
View Post
PHP Code:
CMD:event(playeridparams[])
{
    if( 
pInfo[playerid][pAdmin] < )
        return 
0;
        
    new 
id;
    
    if (
isnull(params))
        return 
SendUsageErrorplayerid"/event [create/rename/teles/kick/freeze/disarm/weapons/end]" );
    if(!
strcmp(params"kick"true))
    {
            new 
kid;
        if (
sscanf(params"su""kick"kid))
            return 
SendUsageErrorplayerid"/event [kick] [ID]" );
        
        if(
inEvent[kid] == 1)
        {
            
format(strsizeof(str), "[EVENT] {FFFFFF}%s has been kicked from the event"Name[kid], kid);
            
SendClientMessageToAll(COLOR_EVENTstr);
                        
SetPlayerHealth(kid0);
                 
inEvent[kid] = 0;
                
eInfo[eventFrozen] = 0;
                
TogglePlayerControllable(kid1);
        }
        else
                {
             
Error(playerid"This player is not participating in your event");
                }
        
    }
    return 
1;

I actually tried that before, it works and sends the usage errors but it does not execute the code if you fill in all parameters.

Anything else?
Reply


Messages In This Thread
Issue with kicking players from an event - by FunnyBear - 10.12.2016, 17:30
Re: Issue with kicking players from an event - by iLearner - 10.12.2016, 18:33
Re: Issue with kicking players from an event - by Hansrutger - 10.12.2016, 19:28
Re: Issue with kicking players from an event - by FunnyBear - 10.12.2016, 20:32
Re: Issue with kicking players from an event - by Hansrutger - 10.12.2016, 21:01
Re: Issue with kicking players from an event - by NeXoR - 10.12.2016, 21:08
Re: Issue with kicking players from an event - by FunnyBear - 10.12.2016, 21:12
Re: Issue with kicking players from an event - by FunnyBear - 10.12.2016, 21:16
Re: Issue with kicking players from an event - by Yaa - 10.12.2016, 21:27
Re: Issue with kicking players from an event - by FunnyBear - 10.12.2016, 21:31

Forum Jump:


Users browsing this thread: 3 Guest(s)