30.07.2013, 22:18
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:
Sorry for my bad english.
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(playerid, newstate, oldstate)
{
if(newstate == 2)
{
new sweeper = GetPlayerVehicleID(playerid);
if(sweeper == 574)
{
if(Team[playerid] != TEAM_SWEEPER)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_LIRED, " You need to be a Street Sweeper to use this car ");
}
else
{
SendClientMessage(playerid, -1, "You're driving car id 574");
}
}
}
return 1;
}