[Ajuda] Compra Armas Bugado
#1

Tipo digito /comprararmas ai vou escolher a arma que eu quero й vem um carro vou mostra meu dialog

PHP код:
if (strcmp("/comprararmas"cmdtexttrue10) == 0)
    {
        
ShowPlayerDialog(playeridDIALOG_COMPRARARMASDIALOG_STYLE_TABLIST_HEADERS"Escolha a Arma Desejada","Armas\tValor\nM4-A1\t$30.000\nMP5\t$25.000\nAK-47\t$50.000\nDeagle\t$15.000","Comprar""Cancelar");
           return 
1;
       } 
PHP код:
if(dialogid == DIALOG_COMPRARARMAS)
    {
        if(!
response) return SCM(playeridVermelho,"[ERRO] Compra Cancelada.");
        {
             if(
listitem == 0)
            {
               if(
Player[playerid][pPresoADM] == || Player[playerid][pPresoSF] == || Player[playerid][pPresoLV] == || Player[playerid][pPresoLS] == || Player[playerid][InHospital] == true || Player[playerid][InHospital] == true || Player[playerid][InDM] == true)
                return 
SCM(playeridCOR_ERRO"[ERRO] Vocк nгo fazer isso!");
              if(
GetPlayerMoney(playerid) < 30000) return SCM(playerid,Vermelho,"[ERRO] Vocк nгo tem dinheiro para comprar esta arma.");
            {
                    
GivePlayerMoney(playerid,-30000);
                    
SCM(playerid,COR_LIGHTBLUE,"Vocк comprou uma M4");
                    
GivePlayerWeapon(playerid,31,3000000);
                }
            }
            if(
listitem == 1)
            {
                if(
GetPlayerMoney(playerid) < 25000) return SCM(playeridVermelho,"[ERRO] Vocк nгo tem dinheiro para comprar estб arma.");
                {
                    
GivePlayerMoney(playerid,-25000);
                    
SCM(playerid,COR_LIGHTBLUE,"Vocк comprou uma MP5");
                    
GivePlayerWeapon(playerid,29,3000000);
                }
            }
            if(
listitem == 2)
            {
                if(
GetPlayerMoney(playerid) < 30000) return SCM(playeridVermelho,"[ERRO] Vocк nгo tem dinheiro para comprar estб arma.");
                {
                       
GivePlayerMoney(playerid,-50000);
                    
SCM(playerid,COR_LIGHTBLUE,"Vocк comprou uma AK-47");
                    
GivePlayerWeapon(playerid,30,3000000);
                }
            }
              if(
listitem == 3)
            {
                if(
GetPlayerMoney(playerid) < 15000) return SCM(playeridVermelho,"[ERRO] Vocк nгo tem dinheiro para comprar estб arma.");
                {
                       
GivePlayerMoney(playerid,-15000);
                    
SCM(playerid,COR_LIGHTBLUE,"Vocк comprou uma Desert Eagle");
                    
GivePlayerWeapon(playerid,24,3000000);
                }
            }
        }
        return 
1;
    } 
Tб aparecendo o veiculo olha o code do veiculo que aparece
PHP код:
if(newstate == PLAYER_STATE_DRIVER)
    {
        if(
VeiculosHelper(GetPlayerVehicleID(playerid)))
        {
             if(
Player[playerid][pHelper] < 1)
            {
                new 
Float:Pos[3];
                
GetPlayerPos(playeridPos[0], Pos[1], Pos[2]);
                
SetPlayerPos(playeridPos[0], Pos[1], Pos[2]+1);
                   
SCM(playeridCOR_ERRO"[ERRO] Veнculo exclusivo para Helpers!");
            }
        }
     } 
Reply


Messages In This Thread
Compra Armas Bugado - by Dimbalada - 18.04.2018, 22:21
Re: Compra Armas Bugado - by AutoMatic2 - 18.04.2018, 22:29
levemente entendi o que tu falou - by RazorGuigo - 18.04.2018, 22:30
Re: Compra Armas Bugado - by AutoMatic2 - 18.04.2018, 22:38
Re: Compra Armas Bugado - by AutoMatic2 - 18.04.2018, 22:41
Re: Compra Armas Bugado - by SpikeCompiler - 18.04.2018, 23:16
Re: Compra Armas Bugado - by Dimbalada - 19.04.2018, 00:59
Re: Compra Armas Bugado - by Dimbalada - 19.04.2018, 01:36
Re: Compra Armas Bugado - by FabioStralioti - 19.04.2018, 03:08
Re: Compra Armas Bugado - by Dimbalada - 20.04.2018, 12:52

Forum Jump:


Users browsing this thread: 1 Guest(s)