Mask problem
#1

When you are in the car and type the command, do not put the mask. But when the car outside the command goes.
What can I do?
PHP код:
CMD:mask(playerid,params[])
{
    if(
PlayerInfo[playerid][pMask] == || Mask[playerid] == 1)
    {
        if(
MaskOn[playerid] == 0)
        {
            
MaskOn[playerid] = 1;
            
GameTextForPlayer(playerid"~p~MASK ON"50003);
            for(new 
0MAX_PLAYERSi++)
            {
                
ShowPlayerNameTagForPlayer(playeridi0); 
            }
        }                                        
        else if(
MaskOn[playerid] == 1)
        {
            
MaskOn[playerid] = 0;
            
GameTextForPlayer(playerid"~p~MASK OFF"50003);
            for(new 
0MAX_PLAYERSi++) ShowPlayerNameTagForPlayer(playeridi1);
        }
        return 
1;
    }
    else return 
SCM(playeridCOLOR_LIGHTRED"Nu ai o masca.");

Reply
#2

PHP код:
CMD:mask(playerid,params[])
{
    if(!
IsPlayerInAnyVehicle(playerid))
    {
        if(
PlayerInfo[playerid][pMask] == || Mask[playerid] == 1)
        {
            if(
MaskOn[playerid] == 0)
            {
                
MaskOn[playerid] = 1;
                
GameTextForPlayer(playerid"~p~MASK ON"50003);
                for(new 
0MAX_PLAYERSi++)
                {
                    
ShowPlayerNameTagForPlayer(playeridi0);
                }
            }
            else if(
MaskOn[playerid] == 1)
            {
                
MaskOn[playerid] = 0;
                
GameTextForPlayer(playerid"~p~MASK OFF"50003);
                for(new 
0MAX_PLAYERSi++) ShowPlayerNameTagForPlayer(playeridi1);
            }
            return 
1;
        }
        else return 
SCM(playeridCOLOR_LIGHTRED"Nu ai o masca.");
    }
    else return 
SCM(playeridCOLOR_LIGHTRED"You cannot do this inside a vehicle.");

Reply
#3

I want to work in a vehicle..
Reply
#4

bump
Reply
#5

try to make a command for a veh, and command for the player when he is not in veh. then check @_@
just add the command in the veh " if(IsPlayerInAnyVehicle(playerid)) "
and the command for the player outsid the vehile " if(!IsPlayerInAnyVehicle(playerid)) "
Reply
#6

Do you want the command not to be processed in a vehicle, or you're trying to use it in a vehicle and it doesn't work?
Reply
#7

I trying to use it in a vehicle and outside the vehicle and it doesn't work in vehicle
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)