/location [id]
#1

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
Reply
#2

Hm, I'll try to script something and I'll be back!
Reply
#3

Easier to spectate the player.
Reply
#4

thanks
Reply
#5

if youre not admin you dont have the chance to use spectate this is basically for the players to find another player
Reply
#6

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?
Reply
#7

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
Reply
#8

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.
Reply
#9

Thanks
Reply
#10

You're welcome my friend ^^
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)