hi all. i wanna make /loc cmd for my gm for finding any player.. how i can do this?
any player can use this cmd.. plz help. loc for finding snipers .. weakness for sniper. and finding others for getting revenge..
sory for my bad english..i hope u understand

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]");

        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;

thanks its pretty easy +rep to u,,

Forum Jump:

Users browsing this thread: 1 Guest(s)