[Ajuda] Conflito entre ID's
#6

Opa vlw, mal ai vou arrumar aqui у!

pawn Код:
// Ports the player to the given player
COMMAND:ir(playerid, params[])
{
    // Setup local variables
    new OtherPlayer, Float:x, 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;
}
Reply


Messages In This Thread
Conflito entre ID's - by GhhamM - 29.08.2013, 00:12
Re: Conflito entre ID's - by xxRaioxx - 29.08.2013, 00:15
Re: Conflito entre ID's - by PT - 29.08.2013, 00:23
Re: Conflito entre ID's - by GhhamM - 29.08.2013, 00:24
Re: Conflito entre ID's - by Sti - 29.08.2013, 00:25
Re: Conflito entre ID's - by GhhamM - 29.08.2013, 00:28
Re: Conflito entre ID's - by Brenoas - 29.08.2013, 00:39
Re: Conflito entre ID's - by focaximubh - 29.08.2013, 03:40
Re: Conflito entre ID's - by bruxo00 - 29.08.2013, 10:28
Re: Conflito entre ID's - by Brenoas - 30.08.2013, 22:53

Forum Jump:


Users browsing this thread: 3 Guest(s)