Advertisement
Guest User

Sistem Quest Static

a guest
Dec 14th, 2016
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.04 KB | None | 0 0
  1. //define-uri ale sistemului
  2. new QuestEventState = 1; //Pentru moment evenimentul se începe odată cu deschiderea serverului.
  3.  
  4.  
  5. #define QuestName "Hearts Quest" //Denumirea acestui eveniment.
  6. #define QuestSingleName "hearts" //Cum se numesc acestea (x din x inimii)
  7.  
  8.  
  9. new QuestObject = 1240; //Object pentru Pickup.
  10.  
  11.  
  12. //si mai jus puneți pozitiiile.
  13. new Float:QuestPositions[][4] = {
  14.     {-2426.7627000,2214.1216000,4.9844000},
  15.     {-2573.6902000,2239.6013000,4.9822000},
  16.     {-2608.6724000,2282.9377000,8.3594000},
  17.     {-2608.5308000,2382.1914000,9.9331000},
  18.     {-2566.4634000,2407.9978000,14.8467000},
  19.     {-2563.1536000,2383.7449000,13.0426000},
  20.     {-2570.7590000,2350.4607000,5.9321000},
  21.     {-2569.8328000,2306.8784000,4.9844000},
  22.     {-2549.7969000,2277.7483000,4.9844000},
  23.     {-2525.0195000,2265.0696000,4.9878000},
  24.     {-2500.1206000,2254.8196000,4.9647000},
  25.     {-2486.3098000,2253.1038000,4.9844000},
  26.     {-2473.3911000,2250.2566000,4.9844000}
  27. };
  28. new QuestPickups[sizeof(QuestPositions)]; //pickup-ul.
  29. new Text3D: QuestText[sizeof(QuestPositions)]; //text-ul 3d.
  30.  
  31.  
  32.  
  33. //la OnGameModeInit
  34. new string[256]; //String nou cu questul.
  35. for(new a = 0; a < sizeof(QuestPositions); a++)
  36. {
  37.     format(string, sizeof(string), "Inima #%d", a + 1);
  38.     QuestText[a] = CreateDynamic3DTextLabel(string, -1,QuestPositions[a][0],QuestPositions[a][1],QuestPositions[a][2], 5.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 5.0);
  39.     QuestPickups[a] = CreateDynamicPickup(QuestObject, 23, QuestPositions[a][0],QuestPositions[a][1],QuestPositions[a][2], 0);
  40. }
  41. //public nou(aici cred ca este toata smecheria...dar nu stiu cum s-o aflu :D )
  42. public OnPlayerPickUpDynamicPickup(playerid, STREAMER_TAG_PICKUP pickupid)
  43. {
  44.     if(QuestEventState == 1)
  45.     {
  46.         new str[256];
  47.         if(PlayerInfo[playerid][pLastHeart] != sizeof(QuestPositions) && PlayerInfo[playerid][pLastHeart] != 999)
  48.         {
  49.             if(pickupid == QuestPickups[PlayerInfo[playerid][pLastHeart]])
  50.             {
  51.                 PlayerInfo[playerid][pLastHeart] ++;
  52.                 if(PlayerInfo[playerid][pLastHeart] != sizeof(QuestPositions))
  53.                 {
  54.                     format(str,sizeof(str), "%d din %d %s gasite!", PlayerInfo[playerid][pLastHeart], sizeof(QuestPositions), QuestSingleName);
  55.                     GameTextForPlayer(playerid, str, 3000, 3);
  56.                 }
  57.                 else
  58.                 {
  59.                     format(str,sizeof(str), "Toate %s au fost gasite!", QuestSingleName); //Inimile gasite, mesaj. + premiul.
  60.                     GameTextForPlayer(playerid, str, 3000, 3);
  61.                     GivePlayerMoney(playerid, 50000);
  62.                     PlayerInfo[playerid][pLastHeart] = 999;
  63.                 }
  64.             }
  65.             else
  66.             {
  67.                 format(str,sizeof(str), "(%s) {FFFFFF}Aceasta nu este inima nevoită de tine. Tu ai nevoie de #%d.", QuestName, PlayerInfo[playerid][pLastHeart] + 1); //Nu e inima corecta.
  68.                 SCM(playerid, COLOR_LIGHTRED, str);
  69.             }
  70.         }
  71.     }
  72. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement