08.06.2015, 08:58
Quote:
EDIT:
Код:
new Goto[MAX_PLAYERS] = 1; CMD:go(playerid, params[]) { new TargetID, Float:X, Float:Y, Float:Z, Float:A; if(sscanf(params, "u", TargetID)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE:/go (playerid) to teleport to that player"); if(Goto[TargetID] == 1) { GetPlayerPos(TargetID, X, Y, Z); GetPlayerFacingAngle(TarggetID, A); SetPlayerPos(playerid, X + 1, Y, Z); SetPlayerFacingAngle(playerid, A + 180); } else if(Goto[TargetID] == 0) { SendClientMessage(playerid, 0xFF0000FF, "That player disabled teleports to him!"); } return 1; } CMD:gos(playerid, params[]) { if(Goto[playerid] == 0) { Goto[playerid] = 1; SendClientMessage(playerid, 0xFF0000FF, "You have enabled player from teleporting to you!"); } else { Goto[playerid] = 0; SendClientMessage(playerid, 0xFF0000FF, "You have disabled player from teleporting to you!"); } return 1; } Now the player will be teleported to the other player face to face And "Goto" must to be for each player. |