05.06.2009, 12:31
Quote:
|
I am not sure if you can stop them from car jacking |
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new vehicleid = GetPlayerVehicleID(playerid);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(gTeam[i] == gTeam[playerid])
{
SetVehicleParamsForPlayer(vehicleid, i, 0, 1); //locks the car for anyone on the team of the player entering the car.
}
}
}
else if(newstate == PLAYER_STATE_EXIT_VEHICLE)
{
new vehicleid = GetPlayerVehicleID(playerid);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(gTeam[i] == gTeam[playerid])
{
SetVehicleParamsForPlayer(vehicleid, i, 0, 0);//unlocks the car for anyone on the team of the player entering the car.
}
}
}
return 1;
}
Код:
new vehicleid = GetPlayerVehicleID(playerid);

