[Pedido] DESBUGAR COMPRARARMAAS
#7

Algo simples, nгo copie apenas analise o cуdigo !
PHP код:
#define PickupArma      200

public OnPlayerKeyStateChange(playeridnewkeysoldkeys) {
    if((
newkeys == KEY_SECONDARY_ATTACK))  {
        if(
IsPlayerInRangeOfPoint(3playerid,-379.3475,1585.4386,77.1554, -1)) ShowPlayerDialog(playeridPickupArmaDIALOG_STYLE_LIST"Armas""M4\nDeagle""Comprar""Cancelar");//
    
}
    return 
1;
}

public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[]) {
    switch(
dialogid) {
        case 
PickupArma: {
            if(
response) {
                switch(
listitem) {
                    case 
0: {
                        if(
GetPlayerMoney(playerid) < 3000) return SendClientMessage(playerid0xFFFFFF"Voce nao tem dinheiro suficiente"); // se ele nao tiver 500 , retorna essa mensagem!
                        
GivePlayerMoney(playerid, -3000);
                        
GivePlayerWeapon(playerid31500);
                        
SendClientMessage(playerid, -1"Vocк comprou M4 com Sucesso!");
                        
PlayerPlaySound(playerid,1149,0.0,0.0,0.0);
                    }
                    case 
1: {
                        if(
GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid0xFFFFFF"Voce nao tem dinheiro suficiente"); // se ele nao tiver 500 , retorna essa mensagem!
                        
GivePlayerMoney(playerid, -5000);
                        
GivePlayerWeapon(playerid24500);
                        
SendClientMessage(playerid, -1"Vocк comprou DEAGLE com Sucesso!");
                        
PlayerPlaySound(playerid,1149,0.0,0.0,0.0);
                    }
                }
            }
            return 
1;
        }
    }
    return 
1;

Reply


Messages In This Thread
DESBUGAR COMPRARARMAAS - by Dimbalada - 09.04.2017, 23:03
Re: DESBUGAR COMPRARARMAAS - by HoodScript - 09.04.2017, 23:07
Re: DESBUGAR COMPRARARMAAS - by Dimbalada - 09.04.2017, 23:14
Re: DESBUGAR COMPRARARMAAS - by Dimbalada - 10.04.2017, 00:00
Re: DESBUGAR COMPRARARMAAS - by ViniBorn - 10.04.2017, 00:17
Re: DESBUGAR COMPRARARMAAS - by Dimbalada - 10.04.2017, 00:33
Re: DESBUGAR COMPRARARMAAS - by [BOPE]Seu._.Madruga - 10.04.2017, 23:53

Forum Jump:


Users browsing this thread: 2 Guest(s)