hfind command
#1

Hey all!
i scripted a command hfind using ZCMD for cops that if they want to find someone it set on their checkpoint on radar of the player, but the problem its not tracking the player if he moves, i want it keep tracking him while moving, how can i do this?
and SetPlayerMarkerForPlayer function has only radius of 30, i want for all map whatever the radius between the players.


Код:
CMD:hfind(playerid, params[])
{
	if(IsACop(playerid))
	{
		new string[128], giveplayerid;
		if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /hfind [playerid]");

		if(IsPlayerConnected(giveplayerid))
		if(giveplayerid == playerid) return SendClientMessage(playerid, COLOR_GRAD2, "You can't /hfind yourself!");
		if(!hfind)
		{
				hfind = 1;
		        format(string, sizeof(string), " You have set your GPS on the player %s, look for {FF0000}Red Marker {FFFFFF}on your radar.", GetPlayerNameEx(giveplayerid));
				SendClientMessageEx(playerid, COLOR_WHITE, string);
				new Float:slx, Float:sly, Float:slz;
				GetPlayerPos(giveplayerid, slx, sly, slz);
				SetPlayerCheckpoint(playerid, slx, sly, slz, 3);
				}
				else
				{
				hfind = 0;
				format(string, sizeof(string), " You have stopped your GPS on the player %s.", GetPlayerNameEx(giveplayerid));
				SendClientMessageEx(playerid, COLOR_WHITE, string);		
				DisablePlayerCheckpoint(playerid);
		}
	}
	else
	{
		SendClientMessage(playerid, COLOR_GRAD1, "You are not a LEO!");
	}
	return 1;
}
Reply
#2

Set ShowPlayerMarkers to PLAYER_MARKERS_MODE_GLOBAL (1) then.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)