Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Filterscript by LarryTiger
- #include <a_samp>
- #define COLOR_RED 0xFF0000AA
- #define COLOR_YELLOW 0xFFFF00AA
- new flyjobrunning = 0;
- new info;
- public OnFilterScriptInit()
- {
- AddStaticVehicle(519,1729.8932,-2415.7798,14.4727,149.2040,1,1); //
- AddStaticVehicle(519,1739.6110,-2543.2544,13.5469,353.2043,1,1); //
- AddStaticVehicle(519,1786.4404,-2542.7852,13.5469,269.2301,1,1); //
- AddStaticVehicle(519,1818.4126,-2428.5762,13.5547,178.3859,1,1); //
- AddStaticVehicle(519,1767.3907,-2455.8711,13.5547,179.0126,1,1); //
- info = CreatePickup(1239,1,1748.7014,-2421.0500,13.5547,-1);
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/startflight", cmdtext, true, 10) == 0)
- {
- if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 519)
- {
- flyjobrunning = 1;
- SetPlayerCheckpoint(playerid, -1253.9714,238.6661,14.1484, 10);
- SetPlayerCheckpoint(playerid, 1053.8138,-2361.4197,115.3864, 10);
- SetPlayerCheckpoint(playerid, -177.6360,-1237.1620,173.7164, 10);
- SetPlayerCheckpoint(playerid, -1219.2340,-107.7123,15.0656, 10);
- GameTextForPlayer(playerid, "~g~Ai pornit pilotajul, succes!", 3000, 3);
- new name[MAX_PLAYER_NAME], string[48];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "%s este pilot.", name );
- SendClientMessageToAll(COLOR_RED, string);
- return 1;
- }
- SendClientMessage(playerid, COLOR_RED,"Trebuie sa fi in avion pentru a incepe pilotajul");
- }
- if (strcmp("/flyinfo", cmdtext, true, 10) == 0)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "Va trebui sa intri prin checkpoint-uri cu avionul.");
- SendClientMessage(playerid, COLOR_YELLOW, "Dupa ce vei urca in avion, tasteaza /startflight si dute prin checkpoint-urile rosi.");
- return 1;
- }
- return 0;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 519)
- {
- GivePlayerCash(playerid, 100000);
- GameTextForPlayer(playerid, "~g~Munca a luat sfarsit, felicitari!", 3000, 3);
- SetVehicleToRespawn(1);
- DisablePlayerCheckpoint(playerid);
- flyjobrunning = 500;
- SetPlayerPos(playerid, 1729.8932,-2415.7798,14.4727);
- }
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 519)
- {
- SendClientMessage(playerid, COLOR_RED, "Pentru a porni jobul tasteaza /startflight cand te afli in avion");
- }
- return 0;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- if((flyjobrunning) == 1)
- {
- flyjobrunning = 0;
- SendClientMessage(playerid, COLOR_RED, "Ai pierdut cursa!");
- }else if((flyjobrunning) == 0){
- //Nothing
- }
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == info)
- {
- GameTextForPlayer(playerid, "~g~Bine ai venit la jobul de pilotaj, foloseste /flyinfo pentru informatii", 3000, 3);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement