Advertisement
Guest User

comanda /bonus

a guest
Jun 9th, 2020
685
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.74 KB | None | 0 0
  1. // la inceput de gm puneti
  2. #define DIALOG_BONUS 1938
  3. ///
  4.  
  5. // la public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) , cautati linia  if(newkeys & KEY_SECONDARY_ATTACK)  , si adaugati putin mai jos asta :
  6.  
  7. if(IsPlayerInRangeOfPoint(playerid, 2,1478.4806,-1761.0885,17.8425))   // aici va puneti locatia de unde se va lua bonusul
  8.             {
  9.                 new String[128], bString2[150];
  10.                 if(PlayerInfo[playerid][pLevel] >1) return SCM(playerid, COLOR_RED, "Ne cerem scuze , ai primit deja bonusul , daca nu ai primit bonusul , contacteaza un admin!");
  11.                 format(String, sizeof(String), "Premier\n");
  12.                 format(bString2, sizeof(bString2), "Faggio\n");
  13.                 strcat(String, bString2);
  14.                 SetPlayerScore(playerid, 2);
  15.                 PlayerInfo[playerid][pLevel] = 2;
  16.                 UpdateVar(playerid, "Level", 2);
  17.                 ShowPlayerDialog(playerid, DIALOG_BONUS, DIALOG_STYLE_LIST, "Bonus", String, "OK", "Close");
  18.  
  19.  
  20. //
  21.  
  22. // la public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) , adaugati urmatoarea linie
  23.  
  24. case DIALOG_BONUS :
  25.         {
  26.             if(!response) return true;
  27.             new  money[180], premium[180];
  28.             switch(listitem) {
  29.                 case 0: {
  30.                     GiveVehicle(playerid, 426, 0, 0, 0, 0, 0);
  31.                     format(money, sizeof(money), "$2.500.000\n");
  32.                     format(premium, sizeof(premium), "25 premium points\n");
  33.                     strcat(money,premium);
  34.                     ShowPlayerDialog(playerid, DIALOG_BONUS+1, DIALOG_STYLE_LIST, "Bonus", money, "OK", "Close");
  35.                
  36.                     }
  37.                 case 1: {
  38.                     GiveVehicle(playerid, 462, 0 , 0 , 0 ,0 , 0);
  39.                     format(money ,sizeof(money), "$2.500.000\n");
  40.                     format(premium, sizeof(premium), "25 premium points\n");
  41.                     strcat(money, premium);
  42.                     ShowPlayerDialog(playerid, DIALOG_BONUS+1, DIALOG_STYLE_LIST, "Bonus", money, "OK", "Close");
  43.                
  44.                     }
  45.                    
  46.                 }
  47.         }
  48.  
  49.         case DIALOG_BONUS+1 :
  50.         {
  51.             if(!response) return true;
  52.             switch(listitem) {
  53.                 case 0:  {
  54.                     GivePlayerCash(playerid, 1, 2500000);
  55.                     Update(playerid, pCashx);
  56.                     SCM(playerid, COLOR_GREY, "SERVER: Ai primit bonusul si level 2");
  57.                
  58.                 }
  59.                 case 1: {
  60.                         PlayerInfo[playerid][pPremiumPoints] += 25;
  61.                         Update(playerid, pPremiumPointsx);
  62.                         SCM(playerid, COLOR_GREY, "SERVER:Ai primit bonusul si level 2");
  63.                 }
  64.                
  65.             }
  66.         }
  67.  
  68. //
  69.  
  70.  
  71.  
  72. // la public OnPlayerConnect(playerid)  adaugati asta
  73.  
  74. format(gString, 100, "Apasa tasta F , pentru a lua bonusul special\n");
  75.     CreateDynamic3DTextLabel(gString, 0xFFEA00FF,1478.4806,-1761.0885,17.8425, 100, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1); // aici puneti locatia unde vreti sa fie textul
  76.  
  77.  
  78. //
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement