/location [id] - 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: /location [id] (
/showthread.php?tid=303118)
/location [id] -
[LHT]Bally - 11.12.2011
hi anyone have a way of making a command that lets u see the location of a player ?
so say like /player [id] and then they light up on the map ?
in zcmd
Re: /location [id] -
PlayHard - 11.12.2011
Hm, I'll try to script something and I'll be back!
Re: /location [id] -
NessaHD - 11.12.2011
Easier to spectate the player.
Re: /location [id] -
[LHT]Bally - 11.12.2011
thanks
Re: /location [id] -
[LHT]Bally - 11.12.2011
if youre not admin you dont have the chance to use spectate this is basically for the players to find another player
Re: /location [id] -
NessaHD - 11.12.2011
Lol, you have? If you dont set it to IsPlayerAdmin, then everyone can spectate each other.
Or if you want to use it for everyone, why not simply use the GetPlayerPos and then show it to someone else?
Re: /location [id] -
[LHT]Bally - 11.12.2011
right but i want it so u type /player [id] and then the player id you typed shows up green on mini map for you
Re: /location [id] -
PlayHard - 11.12.2011
There you go mate,
pawn Код:
CMD:location(playerid, params[])
{
new string[128], GuyID, Float:x, Float:y, Float:z;
new pName[MAX_PLAYER_NAME];
if(sscanf(params,"i",GuyID)) return SendClientMessage(playerid, -1, "/location [PlayerID/PlayerName]");
GetPlayerPos(GuyID, x, y, z);
GetPlayerName(GuyID, pName, sizeof(pName));
SetPlayerCheckpoint(playerid, x,y,z,15);
SetPlayerMarkerForPlayer(playerid, GuyID, 0xFF0000FF );
format(string, sizeof(string),"%s location is: %f, %f, %f.",pName, x, y, z);
SendClientMessage(playerid, -1, string);
return 1;
}
I scripted it, hope it works ^^
EDIT: Okay I just tested it with my friend. It works ^^.
By the way, I need you to put this
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
DisablePlayerCheckpoint(playerid);
return 1;
}
So whenever a player locate another player and when the player drives to the located guy - Entering checkpoint, it disables.
Re: /location [id] -
[LHT]Bally - 11.12.2011
Thanks
Re: /location [id] -
PlayHard - 11.12.2011
You're welcome my friend ^^