Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>//îs băgate
- #include <foreach>//îs băgate
- #define COLOR_YELLOW 0xFFFF00AA
- forward verificare();
- new quest[MAX_PLAYERS], questcar[MAX_PLAYERS] ;
- new questactor;
- //la ongamemodeinit asta
- questactor = CreateActor(79,-2637.8562,-2187.9712,2.6725,112.6931);
- SetActorHealth(questactor, 100.000000);
- ApplyActorAnimation(questactor,"DEALER", "DEALER_DEAL" , 4.0, 1, 0, 0, 0, 0);
- Create3DTextLabel("{FFFFFF}Special Quest\n{3e82ef}Hello buddy, do you want to have an adventure at sea?\n{3e82ef}Then go to the water and type the command {FFFFFF}/startquest\n{3e82ef}Reward:{FFFFFF}100.000$ and 1 respect points",0xEC3E00FF,-2638.7407,-2188.2573,2.6447,15.0,0, 0);
- SetTimer("verificare", 1000, 1);
- //la OnPlayerConnect bagi asta
- quest[playerid] = 0;
- SetPlayerMapIcon(playerid, 1,-2638.7407,-2188.2573,2.6447,9, COLOR_YELLOW);//quest iconita
- //la comandă bagi asta
- CMD:startquest(playerid, params[])
- {
- if (quest[playerid] == 1) return SendClientMessage(playerid, COLOR_YELLOW, "You have already done this mission!");
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_YELLOW, "Get off the vehicle");
- if(IsPlayerInRangeOfPoint(playerid,7.0, -2662.8071,-2183.3416,-0.5975))
- {
- questcar[playerid] = CreateVehicle(453,-2657.4333,-2180.7783,-0.2054,71.8543,1,1,100);
- PutPlayerInVehicle(playerid,questcar[playerid],0);
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpoint(playerid, -4113.1929,-1599.7961,-0.6495, 4.0);
- SendClientMessage(playerid, COLOR_YELLOW, "Follow the red dot.");
- }
- else
- {
- SetPlayerCheckpoint(playerid, -2637.8562,-2187.9712,2.6725, 5.0);
- return 1;
- }
- return 1;
- }
- return 0;
- }
- //la public bagi asta
- public verificare()// verifica 1.0 secunde
- {
- foreach(new i : Player)
- {
- if(IsPlayerConnected(i))
- {
- if(IsPlayerInRangeOfPoint(i, 5, -4113.1929,-1599.7961,-0.6495) )
- {
- if (quest[i] == 0)
- {
- if(GetVehicleModel(GetPlayerVehicleID(i)) == 453)
- {
- DisablePlayerCheckpoint(i);
- DestroyVehicle(questcar[i]);
- quest[i] = 1;
- GivePlayerMoney(i, 100000);
- SetPlayerPos(i, -2645.4902,-2187.4409,4.0054);
- SendClientMessage(i,COLOR_YELLOW,"_________________________________________________________________________");
- SendClientMessage(i,COLOR_YELLOW,"Special Quest:{FFFFFF}Congratulations shipwrecked! You're done!");
- SendClientMessage(i,COLOR_YELLOW,"Reward Quest:{FFFFFF} 100.000$");
- }
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement