[Ajuda] criar um else para desativar
#1

quero criar um else nesse comando para ativar e desativar:
PHP код:
            if(listitem == 3)
            {
                
ResetPlayerWeaponsEx(playerid);
                
SetPlayerAttachedObject(playerid,1,19142,1,0.1,0.05,0.0,0.0,0.0,0.0);
                
SetPlayerAttachedObject(playerid,2,19141,2,0.11,0.0,0.0,0.0,0.0,0.0);
                
SetPlayerAttachedObject(playerid,3,18637,13,0.35,0.0,0.0,0.0,0.0,180.0);
                
GivePlayerWeapon(playerid3310);
                
SendClientMessage(playerid,COLOR_RED,"Vocк equipou sua arma de shock !");
                
SendClientMessage(playerid,COLOR_RED,"Obs: Sу use no procurado se ele tentar fugir, caso contrбrio vocк serб punido !");
                
TogglePlayerControllable(playerid1);
            } 
igual esse para clicar nele ativa e se clicar dinovo desativa:
PHP код:
            if(listitem == 2)
            {
                if(
GetPlayerOrg(playerid) == 1)
                {
                    if(
OnDuty[playerid] != 1)
                    {
                         
SendClientMessage(playeridCOLOR_GREY"Vocк nгo Bateu o cartгo!");
                         return 
1;
                    }
                    if(
rocamativado[playerid] == 0)
                    {
                         
skinrocam[playerid] = GetPlayerSkin(playerid);
                         
SetPlayerSkin(playerid284);
                         
JogadorInfo[playerid][pSkin] = 284;
                         
SendClientMessage(playeridCOLOR_RED"Vocк ativou o modo ROCAM !");
                         
rocamativado[playerid] = 1;
                    }
                    else if(
rocamativado[playerid] == 1)
                    {
                       
SetPlayerSkin(playeridskinrocam[playerid]);
                       
JogadorInfo[playerid][pSkin] = skinrocam[playerid];
                       
SendClientMessage(playeridCOLOR_RED"Vocк desativou o modo ROCAM !");
                       
rocamativado[playerid] = 0;
                    }
                }
                else
                {
                    
SendClientMessage(playeridCOLOR_RED"Vocк nгo й da Policia Militar !");
                    return 
1;
                }
            } 
Reply


Messages In This Thread
criar um else para desativar - by igor97m - 18.01.2015, 16:32
Re: criar um else para desativar - by DiegoLeo - 18.01.2015, 16:38
Re: criar um else para desativar - by Cleyson - 18.01.2015, 16:38
Re: criar um else para desativar - by MultiKill - 18.01.2015, 16:42
Re: criar um else para desativar - by DiegoLeo - 18.01.2015, 16:48
Re: criar um else para desativar - by igor97m - 18.01.2015, 17:20
Re: criar um else para desativar - by MultiKill - 18.01.2015, 17:23
Re: criar um else para desativar - by igor97m - 18.01.2015, 17:28
Re: criar um else para desativar - by MultiKill - 18.01.2015, 17:33
Re: criar um else para desativar - by igor97m - 18.01.2015, 17:44

Forum Jump:


Users browsing this thread: 3 Guest(s)