[DUVIDA] Duvida sobre new e bool.
#9

Exemplo 1:

PHP Code:
new Bloquear[MAX_PLAYERS];
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if(
Bloquear[playerid] == 1) return SendClientMessage(playerid, -1"Vocк nгo pode usar tal comando!");
    return 
1;
}
    
CMD:teste(playeridparams[])
    {
        
Bloquear[playerid] = 1;
        
SetPlayerPos(playerid123);
        return 
1;
    }
public 
OnPlayerDeath(playeridkilleridreason)
{
    
Bloquear[playerid] = 0;
    return 
1;

Exemplo 2:

PHP Code:
bool:Bloquear[MAX_PLAYERS];
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if(
Bloquear[playerid]) return SendClientMessage(playerid, -1"Vocк nгo pode usar tal comando!");
    return 
1;
}
    
CMD:teste(playeridparams[])
    {
        if(
Bloquear[playerid])
        
SetPlayerPos(playerid123);
        return 
1;
    }
public 
OnPlayerDeath(playeridkilleridreason)
{
    if(!
Bloquear[playerid])
    return 
1;

Entгo no caso destes cуdigos, o mais cabнvel seria usar o com variбvel bool: (Exemplo 2) ?

O cуdigo do bool: estб errado, mas criei apenas para exemplo mesmo.
Reply


Messages In This Thread
[DUVIDA] Duvida sobre new e bool. - by Supera - 11.10.2012, 03:55
Re: [DUVIDA] Duvida sobre new e bool. - by BreakDriFT - 11.10.2012, 04:01
Re: [DUVIDA] Duvida sobre new e bool. - by MatheusAlcapone - 11.10.2012, 04:02
Re: [DUVIDA] Duvida sobre new e bool. - by ViniBorn - 11.10.2012, 04:02
Re: [DUVIDA] Duvida sobre new e bool. - by zSuYaNw - 11.10.2012, 04:03
Re: [DUVIDA] Duvida sobre new e bool. - by Supera - 11.10.2012, 04:08
Re: [DUVIDA] Duvida sobre new e bool. - by Supera - 11.10.2012, 04:11
Re: [DUVIDA] Duvida sobre new e bool. - by zSuYaNw - 11.10.2012, 04:20
Re: [DUVIDA] Duvida sobre new e bool. - by Ouro - 11.10.2012, 05:11

Forum Jump:


Users browsing this thread: 1 Guest(s)