29.08.2013, 00:24
ok, mal ai rs
Quer de todos?
Quote:
// Ports the player to the given player COMMAND:ir(playerid, params[]) { // Setup local variables new OtherPlayer, Float, Float:y, Float:z, PortMsg[128], IntID, WorldID; // Send the command to all admins so they can see it SendAdminText(playerid, "/ir", params); // Check if the player has logged in if (APlayerData[playerid][LoggedIn] == true) { // Check if the player's admin-level is at least 1 if (APlayerData[playerid][PlayerLevel] >= 1) { // Check if the player has a wanted level of less than 3 if (GetPlayerWantedLevel(playerid) < 3) { // Check if the player is not jailed if (APlayerData[playerid][PlayerJailed] == 0) { if (sscanf(params, "u", OtherPlayer)) SendClientMessage(playerid, 0xFF0000AA, "Use: /ir [id]"); else { // Check if that other player is online if (IsPlayerConnected(OtherPlayer)) { // Get the location of the other player GetPlayerPos(OtherPlayer, x, y, z); IntID = GetPlayerInterior(OtherPlayer); WorldID = GetPlayerVirtualWorld(OtherPlayer); // Port the player to the given location SetPlayerVirtualWorld(playerid, WorldID); SetPlayerInterior(playerid, IntID); SetPlayerPos(playerid, x, y, z + 3.0); format(PortMsg, 128, "A posiзгo do jogador й: %4.2f, %4.2f, %4.2f", x, y, z + 3.0); SendClientMessage(playerid, 0x00FF00FF, PortMsg); } else SendClientMessage(playerid, 0xFF0000FF, "Esse jogador nгo estб online."); } } else SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Vocк nгo pode usar o comando /ir quando preso."); } else SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Vocк nao pode usar o comando /ir quando procurado."); } else return 0; } else return 0; // Let the server know that this was a valid command return 1; } |