SA-MP Forums Archive
Need a code.. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need a code.. (/showthread.php?tid=275539)



Need a code.. - Mr.Anonymous - 10.08.2011

Hey all...i need a code from which , if a player goes above the speed of 120 km/h ....he gets a fine..i dont need a radar but only a code..i just made a simple one ..can u all plzz correct it...

Код:
new kmh = GetPlayerSpeed(targetid, true);
if(kmh >= 120(playerid) == 1)
	{
	    GetPlayerMoney(playerid) > 10)
	    SafeGivePlayerMoney(playerid, -10000);
	    SendClientMessage(playerid, COLOR_RED,"*** FINE: 10000$ has been reduced from your account because of exceeding the speed limit 120 km/h ***");
or if there is any way for a radar please help me..


Re: Need a code.. - Grim_ - 10.08.2011

You need to look at the function SetPlayerMarkerForPlayer. Use it when you want, inside a loop, to display that player's marker for everyone else connected to the server.

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


Re: Need a code.. - Mr.Anonymous - 10.08.2011

Quote:
Originally Posted by Grim_
Посмотреть сообщение
You need to look at the function SetPlayerMarkerForPlayer. Use it when you want, inside a loop, to display that player's marker for everyone else connected to the server.

https://sampwiki.blast.hk/wiki/SetPlayerMarkerForPlayer
hmm i dont understand what are you saying exactly...can u give more info plz..