Setting a car for just one team not working.
#1

Hello,
I'm trying to set car ID 574 just for one team so if a player is from other team, he won't be able to enter in the car and drive it.

Here is my code:

PHP код:
public OnPlayerStateChange(playeridnewstateoldstate)
{
    if(
newstate == 2)
    {
        new 
sweeper GetPlayerVehicleID(playerid);
        if(
sweeper == 574)
        {
            if(
Team[playerid] != TEAM_SWEEPER)
            {
                
RemovePlayerFromVehicle(playerid);
                
SendClientMessage(playeridCOLOR_LIRED"  You need to be a Street Sweeper to use this car  ");
            }
            else
            {
                
SendClientMessage(playerid, -1"You're driving car id 574");
            }
        }
    }
    return 
1;

Sorry for my bad english.
Reply


Messages In This Thread
Setting a car for just one team not working. - by Magic_Time - 30.07.2013, 22:18
Re: Setting a car for just one team not working. - by IstuntmanI - 30.07.2013, 22:24

Forum Jump:


Users browsing this thread: 1 Guest(s)