Advertisement
Guest User

Keapon 3.0 Erreur

a guest
Jul 18th, 2012
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.86 KB | None | 0 0
  1. /*=====================Keapon V 3.0========================*\
  2. |===================Fait par KonVict92x=====================|
  3. |===========================================================|
  4. |===========================================================|
  5. |===========================================================|
  6. |===========================================================|
  7. */
  8.  
  9. #include <a_samp>
  10. #define COLOR_ORANGE 0xE27507FF
  11. #define DIALOGWEAPONS1 1 //define du Dialogue qui affichera les catégories
  12. #define DIALOGWEAPONSAB 2 //define du Dialogue n°1 nommé "Arme Blanche"
  13. #define DIALOGWEAPONSP 3 //define du Dialogue n°2 nommé "Pistolet"
  14. #define DIALOGWEAPONSM 4 //define du Dialogue n°3 nommé "Mitrailleurs"
  15. #define DIALOGWEAPONSFP 5 //define du Dialogue n°4 nommé "Fusil a Pompe"
  16. #define DIALOGWEAPONSSPEC 6 //define du Dialogue n°5 nommé "Spécial"
  17. #if defined FILTERSCRIPT
  18. #endif
  19.  
  20. public OnFilterScriptInit()
  21. {
  22.     print("\n--------------------------------------");
  23.     print("----------Keapon par KonVict92x---------");
  24.     print("-----------------V 3.0-----------------\n");
  25.     return 1;
  26. }
  27.  
  28. public OnPlayerCommandText(playerid, cmdtext[])
  29. {
  30.     if (strcmp("/armes", cmdtext, true, 10) == 0 || strcmp("/arme",cmdtext,true,10)== 0 || strcmp("/wep",cmdtext,true,10) ==0)
  31.     {
  32.         ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Catégories", "Arme Blanche\nPistolet\nMitrailleurs\nFusil a Pompe\nSpécial", "Ouvrir", "Quitter");
  33.         return 1;
  34.     }
  35.     return 0;
  36. }
  37.  
  38. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  39. {
  40.     if(dialogid == 1)
  41.     {
  42.         if(response)
  43.         {
  44.             if(listitem == 0) //Catégorie 1, "Arme Blanche"
  45.             {
  46.                 ShowPlayerDialog(playerid, DIALOGWEAPONSAB, DIALOG_STYLE_LIST, "Arme Blanche", "Poing Américain\nBatte de Baseball\nPelle\nCouteau\nKatana", "Prendre", "Quitter");
  47.             }
  48.             if(listitem == 1) //Catégorie 2, "Pistolet"
  49.             {
  50.                 ShowPlayerDialog(playerid, DIALOGWEAPONSP, DIALOG_STYLE_LIST, "Pistolets", "9mm\n9mm Silencieux\nDesert Eagle", "Prendre", "Quitter");
  51.             }
  52.             if(listitem == 2) //Catégorie 3, "Mitrailleurs"
  53.              {
  54.                 ShowPlayerDialog(playerid, DIALOGWEAPONSM, DIALOG_STYLE_LIST, "Mitrailleurs", "MiniUzi\nTec9\nMP5\nAK47\nM4", "Prendre", "Quitter");
  55.              }
  56.             if(listitem == 3) //Catégorie 4, "Fusil a Pompe"
  57.              {
  58.                 ShowPlayerDialog(playerid, DIALOGWEAPONSFP, DIALOG_STYLE_LIST, "Fusil a Pompe", "Fusil a Pompe (Classique)\n Fusil a Canon Scié\nFusil de Combat", "Prendre", "Quitter");
  59.             }
  60.             if(listitem == 4) //Catégorie 4, "Spécial"
  61.             {
  62.                 ShowPlayerDialog(playerid, DIALOGWEAPONSSPEC, DIALOG_STYLE_LIST, "Spécial", "RPG\n RPG Téléguidé\n C4 (+ detonateur)\nGrenade\nMinigun\nLance Flamme\nSniper\nCocktail Molotov\nExtincteur\nBombe Tag", "Prendre", "Quitter");
  63.             }
  64.         }
  65.         return 1;
  66.     }
  67.  
  68.     if(dialogid == DIALOGWEAPONSAB) //Catégorie "Arme Blanche"
  69.     {
  70.         if(response)
  71.         {
  72.             if(listitem == 0) //Poing Américain
  73.             {
  74.                 GivePlayerWeapon(playerid,1,0);
  75.                 SendClientMessage(playerid,COLOR_ORANGE,"Vous venez de recevoir un Poing Américain");
  76.             }
  77.             if(listitem == 1) //Batte de Baseball
  78.             {
  79.                 GivePlayerWeapon(playerid,5,0);
  80.                 SendClientMessage(playerid,COLOR_ORANGE,"Vous venez de recevoir une Batte de Baseball");
  81.             }
  82.             if(listitem == 2) //Pelle
  83.             {
  84.                 GivePlayerWeapon(playerid,6,0);
  85.                 SendClientMessage(playerid,COLOR_ORANGE,"Vous venez de recevoir une Pelle");
  86.             }
  87.             if(listitem == 3) //Couteau
  88.             {
  89.                 GivePlayerWeapon(playerid,4,0);
  90.                 SendClientMessage(playerid,COLOR_ORANGE,"Vous venez de recevoir un Couteau");
  91.             }
  92.             if(listitem == 4) //Katana
  93.             {
  94.                 GivePlayerWeapon(playerid,8,0);
  95.                 SendClientMessage(playerid,COLOR_ORANGE,"Vous venez de recevoir un Katana");
  96.             }
  97.         }
  98.         return 1;
  99.     }
  100.  
  101.     return 0;
  102. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement