[Ajuda] MAX_PLAYERS ou Variavel
#8

pawn Код:
new
    bool:TaNaArena[MAX_PLAYERS char],
    carro[MAX_PLAYERS] = 520
;

public OnPlayerConnect(playerid){
    return !(TaNaArena{playerid} = false);
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp("/carro", cmdtext, true))
    {
        CreateVehicle(carro[playerid], 0, 0, 0, 0, 0, 0, 60);
        return 1;
    }

    if(!strcmp("/sair", cmdtext, true)){

        TaNaArena{playerid} = false;
        SetPlayerVirtualWorld(playerid, 0);
        SetPlayerInterior(playerid, 0);
        SpawnPlayer(playerid);
        return 1;
    }
   
   
    if(!strcmp("/arena", cmdtext, true))
    {

        if(TaNaArena{playerid}){
            return SendClientMessage(playerid, -1, "vocк jб estб na arena. digite ( /Sair )");
        }

        TaNaArena{playerid} = true;
        SetPlayerPos(playerid, 1417.0, 1245.89, 8484.78);
        return 1;
    }



    return 0;
}

Aconselho colocar no OnPlayerConnect para quando um player conectar, a boorlana "TaNaArena" nгo ter o mesmo valor antigo.
Reply


Messages In This Thread
MAX_PLAYERS ou Variavel - by RuanRider - 01.10.2013, 14:47
Re: MAX_PLAYERS ou Variavel - by Locky_ - 01.10.2013, 14:50
Re: MAX_PLAYERS ou Variavel - by RuanRider - 01.10.2013, 14:54
Re: MAX_PLAYERS ou Variavel - by ThuuGLif3 - 01.10.2013, 14:56
Re: MAX_PLAYERS ou Variavel - by arakuta - 01.10.2013, 15:05
Re: MAX_PLAYERS ou Variavel - by RuanRider - 01.10.2013, 15:42
Re: MAX_PLAYERS ou Variavel - by DarckWilly - 01.10.2013, 19:51
Re: MAX_PLAYERS ou Variavel - by zSuYaNw - 01.10.2013, 20:07
Re: MAX_PLAYERS ou Variavel - by Zivo - 01.10.2013, 20:52
Re: MAX_PLAYERS ou Variavel - by arakuta - 01.10.2013, 21:02

Forum Jump:


Users browsing this thread: 6 Guest(s)