Advertisement
Guest User

Untitled

a guest
Oct 20th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  2. {
  3. if(dialogid == Gunrack)
  4. {
  5. new gunid = GetPlayerWeapon(playerid);
  6. new ammo = GetPlayerAmmo(playerid);
  7. new i = GetPlayerVehicleID(playerid);
  8. new armaid;
  9. new valormunicao;
  10.  
  11. if (response)
  12. {
  13. if(listitem == 0 && gunid != 0)
  14. {
  15. if(GunRackInfo[i][gWeapon1] != 0)
  16. {
  17. SendClientMessage(playerid, COLOR_ERROR, "Já existe uma arma no slot selecionado.");
  18. return 1;
  19. }
  20. if(gunid == 0)
  21. {
  22. SendClientMessage(playerid, COLOR_ERROR, "Escolha sua arma que deseja colocar no gunrack.");
  23. return 1;
  24. }
  25. GunRackInfo[i][gWeapon1] = gunid;
  26. GunRackInfo[i][gAmmo1] = ammo;
  27. RemovePlayerWeapon(playerid, gunid);
  28. SendClientMessage(playerid,COLOR_WHITE, "Você colocou sua arma no gunrack.");
  29. }
  30. if(listitem == 1)
  31. {
  32. armaid = GunRackInfo[i][gWeapon1];
  33. valormunicao = GunRackInfo[i][gAmmo1];
  34. SendClientMessage(playerid,COLOR_WHITE, "Você pegou sua arma mo gunrack.");
  35. GivePlayerWeapon(playerid, armaid, valormunicao);
  36. return 1;
  37. }
  38. }
  39. }
  40. return 0;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement