Enable radar marker when player enter a vehicle
#1

pawn Code:
Policecar = AddStaticVehicleEx(596,1602.0660,-1683.9678,5.6124,90.3080,0,1, VEHICLE_RESPAWN);
How do I enable the marker when a player enter the "Policecar"?
Reply
#2

SetPlayerMarkerForPlayer
Reply
#3

Quote:
Originally Posted by currencyinstacks
View Post
SetPlayerMarkerForPlayer
But how?
Reply
#4

What exactly do you mean by marker? Radar blips?

https://sampwiki.blast.hk/wiki/SetPlayerMarkerForPlayer
https://sampwiki.blast.hk/wiki/OnPlayerStateChange

https://sampwiki.blast.hk/wiki/GetPlayerVehicleID
https://sampwiki.blast.hk/wiki/GetVehicleModel
Reply
#5

Code:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
      if(newstate == PLAYER_STATE_DRIVER && GetPlayerVehicleID(playerid) == Policecar)
      {
      for(new i = 0; i < MAX_PLAYERS; i++)
      SetPlayerMarkerForPlayer(i, playerid, COLOR);
      }
      return 1;
}
Reply
#6

Thanks it worked now , Repped
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)