01.01.2015, 15:16
Ok there is the explantion for the /goto command.
Код:
CMD:goto(playerid,params[]) { new ID, // Float:X, Float:Y, Float:Z, Float:A; if(sscanf(params,"i", ID)) return SendClientMessage(playerid,-1,"* Usage: /goto [player]"); // Refer to my previous explaination. GetPlayerPos(ID, X,Y,Z); // Getting position of the player you want to TP to. GetPlayerFacingAngle(ID, A); // Getting his facing angle. SetPlayerPos(playerid, X,Y+5,Z); // Setting your position , playerid refers to you & ID refers to the player you're wanting to TP to. SetPlayerFacingAngle(playerid, A); // setting your facing angle SendClientMessage(playerid, -1, " You have successfully been teleported."); return 1; }