[Ajuda] Gunrack
#2

Testa e ve se funciona

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == Gunrack)
    {
        new 
gunid GetPlayerWeapon(playerid);
        new 
ammo GetPlayerAmmo(playerid);
        new 
GetPlayerVehicleID(playerid);
        new 
armaid;
        new 
valormunicao;
        if (
response)
        {
            if(
listitem == && gunid != 0)
            {
                   if(
GunRackInfo[i][gWeapon1] != 0)
                   {
                      
SendClientMessage(playeridCOLOR_ERROR"Jб existe uma arma no slot selecionado.");
                      return 
1;
                   }
                   if(
gunid == 0)
                   {
                      
SendClientMessage(playeridCOLOR_ERROR"Escolha sua arma que deseja colocar no gunrack.");
                        return 
1;
                   }
                   
GunRackInfo[i][gWeapon1] = gunid;
                   
GunRackInfo[i][gAmmo1] = ammo;
                   
RemovePlayerWeapon(playeridgunid);
                   
SendClientMessage(playerid,COLOR_WHITE"Vocк colocou sua arma no gunrack.");
              }
            if(
listitem == 1)
            {
                   
armaid GunRackInfo[i][gWeapon1];
                   
valormunicao GunRackInfo[i][gAmmo1];
                   
SendClientMessage(playerid,COLOR_WHITE"Vocк pegou sua arma mo gunrack.");
                   
GivePlayerWeapon(playeridarmaidvalormunicao);
                   return 
1;
            }
        }
    }
    return 
0;

Reply


Messages In This Thread
Gunrack - by FernandoDutra - 05.03.2016, 13:44
Re: Gunrack - by rhaegartargaryen - 05.03.2016, 17:17
Re: Gunrack - by FernandoDutra - 05.03.2016, 20:23
Re: Gunrack - by KinX - 05.03.2016, 20:39
Re: Gunrack - by FernandoDutra - 05.03.2016, 20:45
Re: Gunrack - by KinX - 05.03.2016, 20:58
Re: Gunrack - by FernandoDutra - 05.03.2016, 21:10
Re: Gunrack - by rhaegartargaryen - 05.03.2016, 21:22
Re: Gunrack - by FernandoDutra - 05.03.2016, 21:28
Re: Gunrack - by Artista - 05.03.2016, 22:01

Forum Jump:


Users browsing this thread: 1 Guest(s)