08.11.2013, 20:55
Alright, I want to check if he's one of these 5 cars. If he is then it sets the checkpoint. DMVCar 0 to 5.
pawn Код:
DMVcar[0] = AddStaticVehicle(520, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1);
DMVcar[1] = AddStaticVehicle(520, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1);
DMVcar[2] = AddStaticVehicle(520, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1);
DMVcar[3] = AddStaticVehicle(520, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1);
DMVcar[4] = AddStaticVehicle(520, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1);
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
if(IsPlayerInVehicle(playerid, DMVCar[0] ??))
{
if(TakingDriverLicense[playerid] == true)
{
SetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 3.0);
}
}
}