[PEDIDO] Nгo usar comando
#6

Basta colocar o comando "/sair" antes de desativar o uso dos comandos em arena:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/sair", true) == 0 && GetPVarInt(playerid, "NaArena") == 1 )
    return SendClientMessage(playerid,Cor,"Vocк saiu!"),
    SetPVarInt(playerid, "NaArena",0);
       
    if(GetPVarInt(playerid, "NaArena") == 1)
    return SendClientMessage(playerid,Cor,"Vocк nгo pode usar comandos na Arena!");
   
    if(strcmp(cmdtext, "/arena", true) == 0 && GetPVarInt(playerid, "NaArena") == 0 )
    {
        if(IsPlayerInAnyVehicle(playerid))
        return SendClientMessage(playerid,Cor,"Vocк nгo pode ir a Arena em um veнculo!");
       
        SetPlayerPos(playerid, 1677.4564,-1337.7351,158.4766);
        ResetPlayerWeapons(playerid);
        GivePlayerWeapon(playerid, 16, 50);
        GivePlayerWeapon(playerid, 31, 100000);
        GivePlayerWeapon(playerid, 26, 100000);
        GivePlayerWeapon(playerid, 32, 100000);
        SetPlayerHealth(playerid, 100.0);
        SetPlayerArmour(playerid, 100.0);
       
        SetPVarInt(playerid, "NaArena",1);
        return 1;
    }  
    //Outros comandos.
    return 0;
}
E, em OnPlayerDeath:
pawn Код:
if(GetPVarInt(playerid, "NaArena") == 1) SetPVarInt(playerid, "NaArena",0);
Reply


Messages In This Thread
[PEDIDO] Nгo usar comando - by [AF]Junior - 28.03.2011, 04:20
Re: [PEDIDO] Nгo usar comando - by rjjj - 28.03.2011, 10:47
Re: [PEDIDO] Nгo usar comando - by Falcon. - 28.03.2011, 11:55
Re: [PEDIDO] Nгo usar comando - by CyNiC - 28.03.2011, 12:27
Re: [PEDIDO] Nгo usar comando - by Josma_cmd - 28.03.2011, 14:57
Re: [PEDIDO] Nгo usar comando - by LuxurioN™ - 28.03.2011, 15:18

Forum Jump:


Users browsing this thread: 1 Guest(s)