Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == Gunrack)
- {
- new gunid = GetPlayerWeapon(playerid);
- new ammo = GetPlayerAmmo(playerid);
- new i = GetPlayerVehicleID(playerid);
- new armaid;
- new valormunicao;
- if (response)
- {
- if(listitem == 0 && gunid != 0)
- {
- if(GunRackInfo[i][gWeapon1] != 0)
- {
- SendClientMessage(playerid, COLOR_ERROR, "Já existe uma arma no slot selecionado.");
- return 1;
- }
- if(gunid == 0)
- {
- SendClientMessage(playerid, COLOR_ERROR, "Escolha sua arma que deseja colocar no gunrack.");
- return 1;
- }
- GunRackInfo[i][gWeapon1] = gunid;
- GunRackInfo[i][gAmmo1] = ammo;
- RemovePlayerWeapon(playerid, gunid);
- 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(playerid, armaid, valormunicao);
- return 1;
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement