#2

Well. It's rather simple. All you have to do is make a command that requires the ID/name of a player and then just set a checkpoint to his location. You could also make it better by making a timer that would re-set the checkpoint every few seconds so that it updates the target's location.


EDIT: Should be smth like this (without timer. You need to have ZCMD and sscanf)

Код:
CMD:loc(playerid, params[])
{
    new target;

    if(sscanf(params, "u", target))
        return SendClientMessage(playerid, -1, "USAGE: /loc [id/PartOfName]");

    if(!IsPlayerConnected(target))
        return SendClientMessage(playerid, -1, "Error: Player not found.");

    if(target == playerid)
        return SendClientMessage(playerid, -1, "Error: You cannot locate yourself.");

    new Float:x, Float:y, Float:z;

    GetPlayerPos(target, x, y, z);

    SetPlayerCheckpoint(playerid, x, y, z, 5.0);

    return 1;
}
Reply


Messages In This Thread
/loc - by sanamalik400 - 30.11.2015, 08:44
Re: /loc - by Denying - 30.11.2015, 09:03
Re: /loc - by sanamalik400 - 30.11.2015, 09:10

Forum Jump:


Users browsing this thread: 1 Guest(s)