30.11.2015, 09:03
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)
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; }