Enable radar marker when player enter a vehicle - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Enable radar marker when player enter a vehicle (
/showthread.php?tid=301671)
Enable radar marker when player enter a vehicle -
[C]ave[M]an - 05.12.2011
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"?
Re: Enable radar marker when player enter a vehicle -
currencyinstacks - 05.12.2011
SetPlayerMarkerForPlayer
Re: Enable radar marker when player enter a vehicle -
[C]ave[M]an - 05.12.2011
Quote:
Originally Posted by currencyinstacks
SetPlayerMarkerForPlayer
|
But how?
Re: Enable radar marker when player enter a vehicle -
MP2 - 05.12.2011
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
Re: Enable radar marker when player enter a vehicle -
AstonDA-G - 05.12.2011
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;
}
Re: Enable radar marker when player enter a vehicle -
[C]ave[M]an - 05.12.2011
Thanks it worked now , Repped