#1

Is still doesn't work
Here is the team define
PHP код:
#define TEAM_ARMY 15 
And cars
PHP код:
enum TeamCars
{
Drug,
Hoodrat,
Gun,
Army
}
new 
Cars[TeamCars]; 
And the cars i have added
PHP код:
    Cars[Army] = AddStaticVehicle(541,1962.3882,-1937.1415,13.0076,1.2733,3,6); // test
    
Cars[Army] = AddStaticVehicle(425,2780.8884,-2348.0901,14.4436,228.6023,1,1); // army v.
    
Cars[Army] = AddStaticVehicle(425,2772.1409,-2355.8445,14.2220,222.7870,1,1); // army v.
    
Cars[Army] = AddStaticVehicle(433,2788.4060,-2417.7620,14.0701,88.1253,1,1); // army v.
    
Cars[Army] = AddStaticVehicle(433,2791.1165,-2456.6572,14.0694,92.7059,1,1); // army v.
    
Cars[Army] = AddStaticVehicle(433,2791.0984,-2494.3308,14.0829,90.0462,1,1); // army v.
    
Cars[Army] = AddStaticVehicle(432,2797.5835,-2557.5564,13.6418,90.1065,1,1); // army v.
    
Cars[Army] = AddStaticVehicle(432,2798.1816,-2550.6978,13.6408,92.5801,1,1); // army v.
    
Cars[Army] = AddStaticVehicle(432,2797.8469,-2544.9685,13.6375,93.7877,1,1); // army v.
    
Cars[Army] = AddStaticVehicle(432,2797.5703,-2538.6052,13.6395,92.4747,1,1); // army v.
    
Cars[Army] = AddStaticVehicle(425,2788.5034,-2525.0461,14.1980,155.7349,3,3); // army v.
    
Cars[Army] = AddStaticVehicle(432,2765.5779,-2532.0911,13.6497,0.1682,1,1); // army v.
    
Cars[Army] = AddStaticVehicle(432,2748.6514,-2554.9119,13.6523,269.0882,1,1); // army v.
    
Cars[Army] = AddStaticVehicle(470,2791.2747,-2439.8943,13.6297,89.8587,1,1); // army v.
    
Cars[Army] = AddStaticVehicle(470,2791.4712,-2435.3208,13.6293,89.7875,1,1); // army v.
    
Cars[Army] = AddStaticVehicle(470,2794.2285,-2477.4604,13.6338,89.0042,1,1); // army v.
    
Cars[Army] = AddStaticVehicle(470,2794.5757,-2473.4094,13.6322,87.5014,1,1); // army v.
    
Cars[Army] = AddStaticVehicle(424,2746.0237,-2449.3643,13.4297,0.5496,1,1); // army v.
    
Cars[Army] = AddStaticVehicle(424,2735.7925,-2434.0601,13.4167,267.6304,1,1); // army v.
    
Cars[Army] = AddStaticVehicle(424,2735.4470,-2425.7336,13.4134,271.4606,1,1); // army v. 
And OnPlayerStateChange
PHP код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
    if (
newstate == PLAYER_STATE_DRIVER)
    {
        new 
CarCheck GetPlayerVehicleID(playerid);
        if(
CarCheck == Cars[Army] )
        {
            if(
gTeam[playerid] != TEAM_ARMY)
            {
                
RemovePlayerFromVehicle(playerid);
                
SendClientMessage(playeridCOLOR_RED"You Don't have the keys for this car!");
                
            }
            else
            {
            
SendClientMessage(playeridCOLOR_GREEN"Hello in you car !");
            }
        }
     }
        return 
1;
    } 
And if the player entered the car and he isn't from the army team it no nothing.

Please Help !!!!
Reply
#2

Try using OnPlayerEnterVehicle to check whether the player is part of the team or not.
Reply
#3

doesn't work any other solution please !!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)