SetPlayerForMarkerPlayer does not set a player marker - 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: SetPlayerForMarkerPlayer does not set a player marker (
/showthread.php?tid=360567)
SetPlayerForMarkerPlayer does not set a player marker -
Jstylezzz - 18.07.2012
Hello everyone,
I recently made a taxi system for my roleplay script, and i have some problems here..
When someone takes a call, they should see the marker of the callerid, simply the playerid that requested.
Here is my code:
pawn Код:
CMD:takepassenger(playerid,params[])
{
new callid;
if(PlayerOrg[playerid] != 9) return SendClientMessage(playerid,COLOR_LIGHTBLUE,"You are not a LST employee!");
if(sscanf(params,"i",callid)) return SendClientMessage(playerid,COLOR_LIGHTBLUE,"Usage: /takepassenger [callcode] || Use /taxicallers for a list of callcodes");
if(RequestsTaxi[callid] != 1) return SendClientMessage(playerid,COLOR_LIGHTBLUE,"This callcode is empty, use /callist for a list of callcodes");
SetPlayerMarkerForPlayer(playerid,callid,0xFF0000FF);
TaxiRangeTimer[playerid] = SetTimerEx("TaxiRangeCheck", 5000, true, "ii",playerid,callid);
return 1;
}
pawn Код:
SetPlayerMarkerForPlayer(playerid,callid,0xFF0000FF);
It's only the marker that is not working, because when i get near the player i get a message: "You have arrived"
Does anyone see what is wrong with the (marker) code?
EDIT: I resolved it using checkpoints, but this is less accurate, because it doesn't update position..
Anyways, this is fixed, so ignore this