Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ______ _ _ _ _
- | _ \ | | | (_) (_)
- | | | |___ ___| |_ __ ___ _| |_ __ _ ___ __ _ ___ _ __ ___ ____ _
- | | | / _ \/ __| __/ _` \ \ / / | |/ _` |/ __| / _` |/ _ \| '__| \ \ / / _` |
- | |/ / (_) \__ \ || (_| |\ V /| | | (_| | (__ | (_| | (_) | | | |\ V / (_| |
- |___/ \___/|___/\__\__,_| \_/ |_| |\__,_|\___| \__, |\___/|_| |_| \_/ \__,_|
- _/ | __/ |
- |__/ |___/
- | Posao Dostavljač Goriva [UNIKATAN] |
- | Verzija skripte 1.5 |
- | Izradio :- Bolex_ |
- LIG
- Upute o korištenju:- Nakon što se zaposlite kao Dostavljac Goriva, prvo što će te napravite je da uđete u vozilo
- ovoga posla, te nakon toga morate da Utovarite teret(/utovar)! Nakon sto se to obavili morat ce te dostaviti ta goriva
- na svaku lokaciju prikazanoj na Mini Mapi!Nakon što dođete do određenog Crvenog Markera, morate izaći iz vozila i uzeti
- "Bocu" goriva(/uzmigas)i dostaviti je na Crveni marker kako bi dobili određenu sumu novaca + bonus ;) Isto tako nastavite
- sa dostavljanjem na drugim lokacijama!
- Nakon što se dostavi svih 5 boca sa gorivom morat će te da utovarite novi teret kako bi mogli nastaviti sa dostavom na
- druge lokacije.Ukoliko mislite da ste dovoljno zaradili i ukoliko zelite prekinuti posao (/prekiniposao) dobit će te onu
- sumu novaca koju ste zaradili sa bonusom!
- */
- //----------------------------------------------------------------------------//
- #define FILTERSCRIPT
- #include <a_samp>
- #include <foreach>
- #include <izcmd>
- #define PRESSED(%0) \
- (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
- new Text3D:POSAO_T, Text3D:UTOVAR_P;
- new PosaoPick, UtovarPick;
- new DOSTAVLJAC_VOZILA[ 6 ], POSAO_DOSTAVLJAC_VOZILA[ MAX_VEHICLES ];
- #define SCM SendClientMessage
- #define SPD ShowPlayerDialog
- #define LOKACIJA ( 4 )
- #define DOSTAVLJAC_BONUS ( 50 )
- #define ZARADA_PO_LOKACIJI ( 100 )
- #define DOSTAVLJAC_BR ( 9 )
- #define NEGATIVNA_LOKACIJA ( 0 )
- #define DOSTAVLJAC_CP
- forward ShowPlayerPosaoInfo( playerid );
- forward HidePlayerPosaoInfo( playerid );
- enum
- {
- D_POMOC
- }
- //----------------------------------------------------------------------------//
- new AktivanPosao[ MAX_PLAYERS ], IgracCP[ MAX_PLAYERS ], PosaoBonus[ MAX_PLAYERS ],
- PosaoZarada[ MAX_PLAYERS ], IgracOprema[ MAX_PLAYERS ];
- new Text:Info0, Text:Info1, Text:Info2, Text:Info3, Text:Info4, Text:Info5;
- new Text:PosaoTD, Text:PosaoTD1, Text:PosaoTD2, Text:PosaoTD3,
- Text:PosaoTD4, Text:PosaoTD5, Text:PosaoTD6;
- new PlayerText:DostavljacInfo[ MAX_PLAYERS ], PlayerText:BacvaPrew[ MAX_PLAYERS ], PlayerText:BonusInfo[ MAX_PLAYERS ],
- PlayerText:TotalZaradaInfo[ MAX_PLAYERS ], PlayerText:ZaradaInfo[ MAX_PLAYERS ];
- //----------------------------------------------------------------------------//
- new Float:LOKACIJE[ DOSTAVLJAC_CP ][ 10 ] = {
- {2143.4839,-2252.9707,13.3015,44.6907},
- {2197.8823,-1973.9418,13.5584,272.7168},
- {2447.8191,-1964.4468,13.5469,0.9570},
- {2066.1118,-1991.9330,13.5469,176.4049},
- {2494.0667,-1463.5614,24.0246,185.2177},
- {2446.4258,-1900.3201,13.5469,178.3327},
- {2157.1709,-1797.2056,13.3644,180.1486},
- {1220.4326,-1812.2965,16.5938,93.4171},
- {957.1688,-1556.5499,13.5781,270.0392},
- {2434.6362,-2124.5618,13.5469,183.1550} //Postavljajte dolje
- };
- //----------------------------------------------------------------------------//
- #if defined FILTERSCRIPT
- public OnFilterScriptInit( )
- {
- print("|--------------------------------------|");
- print(" Dostavljac Goriva by Bolex_! ");
- print("|--------------------------------------|");
- PosaoPick = CreatePickup( 1650, 2, 1902.5525,-1776.3734,13.5469, 0 );
- POSAO_T = Create3DTextLabel( "{ADFF2F}[ Dostavljac Goriva ]\n{ADFF2F}Ugovor: {FFFFFF}Stalni\n{ADFF2F}Da se zaposlite stanite ovdje i {FFFFFF}Prihvati posao",-1,1902.5525,-1776.3734,13.5469,30.0,0,40 );
- UtovarPick = CreatePickup( 3632, 1, 1938.2350,-1773.1140,13.3828, 0 );
- UTOVAR_P = Create3DTextLabel( "{ADFF2F}[ Gorivo - Utovar ]\n{ADFF2F}Broj utovara: {FFFFFF}5\n{ADFF2F}Za utovar ovog tereta upisite {FFFFFF}[ /utovar ]!",-1,1938.2350,-1773.1140,13.3828,30.0,0,1 );
- DisableInteriorEnterExits( );
- //------------------------------------------------------------------------//
- CreateObject(638, 1927.84741, -1767.55627, 13.22687, 0.00000, 0.00000, 180.00000);
- CreateObject(638, 1926.12695, -1766.56580, 13.22687, 0.00000, 0.00000, -90.20003);
- CreateObject(638, 1923.45703, -1766.55652, 13.22687, 0.00000, 0.00000, -90.20003);
- CreateObject(638, 1920.78687, -1766.54724, 13.22687, 0.00000, 0.00000, -90.20003);
- CreateObject(638, 1918.11621, -1766.53796, 13.22687, 0.00000, 0.00000, -90.20003);
- CreateObject(638, 1915.76599, -1766.52942, 13.21687, 0.00000, 0.00000, -90.20003);
- CreateObject(638, 1927.84741, -1770.22717, 13.22687, 0.00000, 0.00000, 180.00000);
- CreateObject(638, 1927.84741, -1772.89832, 13.22687, 0.00000, 0.00000, 180.00000);
- CreateObject(638, 1927.84741, -1775.55896, 13.22687, 0.00000, 0.00000, 180.00000);
- CreateObject(638, 1927.84741, -1778.23889, 13.22687, 0.00000, 0.00000, 180.00000);
- CreateObject(638, 1927.84741, -1780.91919, 13.22687, 0.00000, 0.00000, 180.00000);
- CreateObject(638, 1927.84741, -1783.59998, 13.22687, 0.00000, 0.00000, 180.00000);
- CreateObject(638, 1927.84741, -1785.07043, 13.21687, 0.00000, 0.00000, 180.00000);
- CreateObject(638, 1926.14954, -1786.07776, 13.22687, 0.00000, 0.00000, 90.00000);
- CreateObject(638, 1923.47974, -1786.07776, 13.22687, 0.00000, 0.00000, 90.00000);
- CreateObject(638, 1920.81982, -1786.07776, 13.22687, 0.00000, 0.00000, 90.00000);
- CreateObject(638, 1918.15869, -1786.07776, 13.22687, 0.00000, 0.00000, 90.00000);
- CreateObject(638, 1915.70862, -1786.07776, 13.21687, 0.00000, 0.00000, 90.00000);
- CreateObject(3657, 1923.41235, -1767.50598, 12.98687, 0.00000, 0.00000, 0.00000);
- CreateObject(3657, 1920.09302, -1780.10791, 12.98687, 0.00000, 0.00000, 1.50000);
- CreateObject(3657, 1917.75244, -1785.18591, 12.98687, 0.00000, 0.00000, 180.00000);
- CreateObject(3657, 1923.41235, -1785.18652, 12.98687, 0.00000, 0.00000, 180.00000);
- CreateObject(3515, 1920.14966, -1776.90234, 11.97686, 0.00000, 0.00000, 0.00000);
- CreateObject(19304, 1920.01746, -1774.35498, 12.86280, 0.00000, 0.00000, 1.10000);
- CreateObject(19304, 1920.01953, -1779.44495, 12.86280, 0.00000, 0.00000, 1.90000);
- CreateObject(19304, 1917.40759, -1776.86548, 12.86280, 0.00000, 0.00000, 90.00000);
- CreateObject(19304, 1922.56641, -1776.86548, 12.86280, 0.00000, 0.00000, 90.00000);
- CreateObject(3657, 1917.75244, -1767.48584, 12.98687, 0.00000, 0.00000, 0.00000);
- CreateObject(3657, 1920.09302, -1780.10791, 12.98687, 0.00000, 0.00000, 1.50000);
- CreateObject(3657, 1920.09326, -1773.73816, 12.98687, 0.00000, 0.00000, -179.19998);
- CreateObject(3657, 1923.09241, -1776.80762, 12.98687, 0.00000, 0.00000, 90.00000);
- CreateObject(3657, 1916.82324, -1776.89807, 12.98687, 0.00000, 0.00000, -89.89999);
- CreateObject(628, 1917.47778, -1774.25671, 14.48688, 0.00000, 0.00000, 130.69997);
- CreateObject(628, 1922.73438, -1773.92786, 14.48688, 0.00000, 0.00000, 41.29998);
- CreateObject(628, 1922.81885, -1779.53015, 14.48688, 0.00000, 0.00000, -18.70002);
- CreateObject(628, 1917.30359, -1779.75232, 14.48688, 0.00000, 0.00000, -136.50002);
- CreateObject(1536, 1900.93530, -1777.19812, 12.54690, 0.00000, 0.00000, 90.00000);
- CreateObject(1676, 1940.22900, -1776.39075, 13.89281, 0.00000, 0.00000, 90.00000);
- CreateObject(1676, 1940.22900, -1769.32007, 13.89281, 0.00000, 0.00000, 90.00000);
- CreateObject(19304, 1941.04785, -1776.01440, 12.55280, 0.00000, 0.00000, 90.00000);
- CreateObject(19304, 1941.04785, -1772.53418, 12.55280, 0.00000, 0.00000, 90.00000);
- CreateObject(19304, 1941.04785, -1769.83276, 12.55280, 0.00000, 0.00000, 90.00000);
- CreateObject(19304, 1939.49731, -1769.90393, 12.55280, 0.00000, 0.00000, 90.00000);
- CreateObject(19304, 1939.49731, -1773.37402, 12.55280, 0.00000, 0.00000, 90.00000);
- CreateObject(19304, 1939.49731, -1775.89490, 12.55280, 0.00000, 0.00000, 90.00000);
- CreateObject(1361, 1940.23840, -1778.36450, 12.87686, 0.00000, 0.00000, 0.00000);
- CreateObject(1361, 1940.23840, -1767.62451, 12.87686, 0.00000, 0.00000, 0.00000);
- CreateObject(6958, 1940.49646, -1773.03503, 20.91687, 0.00000, 0.00000, 0.00000);
- CreateObject(11417, 1940.28088, -1772.99634, 17.11281, 0.00000, 0.00000, -45.10001);
- CreateObject(1412, 1900.86987, -1762.39783, 13.79230, 0.00000, 0.00000, 0.51010);
- CreateObject(1412, 1906.14221, -1762.34680, 13.79230, 0.00000, 0.00000, 0.51010);
- CreateObject(1412, 1917.06885, -1762.26270, 13.79230, 0.00000, 0.00000, 0.51010);
- CreateObject(1412, 1922.60889, -1762.23621, 13.79230, 0.00000, 0.00000, 0.51010);
- CreateObject(1412, 1928.15308, -1762.18884, 13.79230, 0.00000, 0.00000, 0.51010);
- CreateObject(3633, 1902.44336, -1764.61243, 13.98450, 0.00000, 0.00000, 0.00000);
- CreateObject(3633, 1902.44336, -1764.61243, 13.02890, 0.00000, 0.00000, 0.00000);
- CreateObject(3632, 1941.77197, -1778.65820, 12.84090, 0.00000, 0.00000, 0.00000);
- CreateObject(3632, 1941.31543, -1779.30273, 12.84090, 0.00000, 0.00000, 0.00000);
- CreateObject(925, 1901.77673, -1785.73425, 13.57390, 0.00000, 0.00000, 90.01359);
- CreateObject(925, 1901.88110, -1789.45569, 13.57390, 0.00000, 0.00000, 90.01359);
- CreateObject(1222, 1902.19812, -1780.19250, 12.98960, 0.00000, 0.00000, 0.00000);
- CreateObject(1222, 1903.16638, -1780.45349, 12.98960, 0.00000, 0.00000, 0.00000);
- CreateObject(1222, 1902.83459, -1779.60364, 12.98960, 0.00000, 0.00000, 0.00000);
- //------------------------------------------------------------------------//
- POSAO_DOSTAVLJAC_VOZILA[ DOSTAVLJAC_VOZILA[ 0 ] ] = 0; POSAO_DOSTAVLJAC_VOZILA[ DOSTAVLJAC_VOZILA[ 1 ] ]= 0;
- POSAO_DOSTAVLJAC_VOZILA[ DOSTAVLJAC_VOZILA[ 2 ] ] = 0; POSAO_DOSTAVLJAC_VOZILA[ DOSTAVLJAC_VOZILA[ 3 ] ]= 0;
- POSAO_DOSTAVLJAC_VOZILA[ DOSTAVLJAC_VOZILA[ 4 ] ] = 0; POSAO_DOSTAVLJAC_VOZILA[ DOSTAVLJAC_VOZILA[ 5 ] ]= 0;
- DOSTAVLJAC_VOZILA[ 0 ] = CreateVehicle(428,1914.7301,-1793.1829,13.5069,330.3089,3,3,60000,0);
- DOSTAVLJAC_VOZILA[ 1 ] = CreateVehicle(428,1918.4766,-1794.1277,13.5067,329.4436,3,3,60000,0);
- DOSTAVLJAC_VOZILA[ 2 ] = CreateVehicle(428,1922.5284,-1794.1038,13.5070,329.2636,3,3,60000,0);
- DOSTAVLJAC_VOZILA[ 3 ] = CreateVehicle(428,1926.5687,-1794.2007,13.5078,330.4030,3,3,60000,0);
- DOSTAVLJAC_VOZILA[ 4 ] = CreateVehicle(428,1933.0986,-1784.5759,13.5075,0.5458,3,3,60000,0);
- DOSTAVLJAC_VOZILA[ 5 ] = CreateVehicle(428,1932.8470,-1770.1198,13.5072,180.5444,3,3,60000,0);
- //------------------------------------------------------------------------//
- PosaoTD = TextDrawCreate(119.500000, 165.125000, "usebox");
- TextDrawLetterSize(PosaoTD, 0.000000, 15.044445);
- TextDrawTextSize(PosaoTD, 34.500000, 0.000000);
- TextDrawAlignment(PosaoTD, 1);
- TextDrawColor(PosaoTD, 0);
- TextDrawUseBox(PosaoTD, true);
- TextDrawBoxColor(PosaoTD, 102);
- TextDrawSetShadow(PosaoTD, 0);
- TextDrawSetOutline(PosaoTD, 0);
- TextDrawFont(PosaoTD, 0);
- PosaoTD1 = TextDrawCreate(41.000000, 168.187500, "usebox");
- TextDrawLetterSize(PosaoTD1, 0.000000, 14.262499);
- TextDrawTextSize(PosaoTD1, 112.500000, 0.000000);
- TextDrawAlignment(PosaoTD1, 1);
- TextDrawColor(PosaoTD1, 0);
- TextDrawUseBox(PosaoTD1, true);
- TextDrawBoxColor(PosaoTD1, 255);
- TextDrawSetShadow(PosaoTD1, 0);
- TextDrawSetOutline(PosaoTD1, 0);
- TextDrawFont(PosaoTD1, 0);
- PosaoTD2 = TextDrawCreate(47.000000, 170.187500, "DOSTAVLJAC GORIVA");
- TextDrawLetterSize(PosaoTD2, 0.132500, 0.738125);
- TextDrawAlignment(PosaoTD2, 1);
- TextDrawColor(PosaoTD2, -1);
- TextDrawSetShadow(PosaoTD2, 0);
- TextDrawSetOutline(PosaoTD2, 1);
- TextDrawBackgroundColor(PosaoTD2, 51);
- TextDrawFont(PosaoTD2, 2);
- TextDrawSetProportional(PosaoTD2, 1);
- PosaoTD3 = TextDrawCreate(43.000000, 175.875000, "-------------------------");
- TextDrawLetterSize(PosaoTD3, 0.204500, 0.790626);
- TextDrawAlignment(PosaoTD3, 1);
- TextDrawColor(PosaoTD3, -5963521);
- TextDrawUseBox(PosaoTD3, true);
- TextDrawBoxColor(PosaoTD3, 0);
- TextDrawSetShadow(PosaoTD3, 0);
- TextDrawSetOutline(PosaoTD3, 1);
- TextDrawBackgroundColor(PosaoTD3, 51);
- TextDrawFont(PosaoTD3, 2);
- TextDrawSetProportional(PosaoTD3, 1);
- PosaoTD4 = TextDrawCreate(50.000000, 197.750000, "PRIHVATI POSAO");
- TextDrawLetterSize(PosaoTD4, 0.148499, 0.777500);
- TextDrawAlignment(PosaoTD4, 1);
- TextDrawColor(PosaoTD4, -1);
- TextDrawSetShadow(PosaoTD4, 0);
- TextDrawSetOutline(PosaoTD4, 1);
- TextDrawBackgroundColor(PosaoTD4, 51);
- TextDrawFont(PosaoTD4, 2);
- TextDrawSetProportional(PosaoTD4, 1);
- TextDrawSetSelectable(PosaoTD4, true);
- PosaoTD5 = TextDrawCreate(59.000000, 217.437500, "ODUSTANI");
- TextDrawLetterSize(PosaoTD5, 0.147499, 0.786250);
- TextDrawAlignment(PosaoTD5, 1);
- TextDrawColor(PosaoTD5, -1);
- TextDrawSetShadow(PosaoTD5, 0);
- TextDrawSetOutline(PosaoTD5, 1);
- TextDrawBackgroundColor(PosaoTD5, 51);
- TextDrawFont(PosaoTD5, 2);
- TextDrawSetProportional(PosaoTD5, 1);
- TextDrawSetSelectable(PosaoTD5, true);
- PosaoTD6 = TextDrawCreate(43.000000, 249.812500, "ZARADA: ~y~PO LOKACIJI + BONUS");
- TextDrawLetterSize(PosaoTD6, 0.104500, 0.580626);
- TextDrawAlignment(PosaoTD6, 1);
- TextDrawColor(PosaoTD6, -1);
- TextDrawSetShadow(PosaoTD6, 0);
- TextDrawSetOutline(PosaoTD6, 1);
- TextDrawBackgroundColor(PosaoTD6, 51);
- TextDrawFont(PosaoTD6, 2);
- TextDrawSetProportional(PosaoTD6, 1);
- //------------------------------------------------------------------------//
- return 1;
- }
- //----------------------------------------------------------------------------//
- public OnFilterScriptExit( )
- {
- print("|--------------------------------------|");
- print(" Dostavljac Goriva by Bolex_! Zatvoren!");
- print("|--------------------------------------|");
- Delete3DTextLabel(POSAO_T); Delete3DTextLabel(UTOVAR_P);
- DestroyPickup(PosaoPick); DestroyPickup(UtovarPick);
- DestroyVehicle(POSAO_DOSTAVLJAC_VOZILA[ 0 ]); DestroyVehicle(POSAO_DOSTAVLJAC_VOZILA[ 1 ]);
- DestroyVehicle(POSAO_DOSTAVLJAC_VOZILA[ 2 ]); DestroyVehicle(POSAO_DOSTAVLJAC_VOZILA[ 3 ]);
- DestroyVehicle(POSAO_DOSTAVLJAC_VOZILA[ 4 ]); DestroyVehicle(POSAO_DOSTAVLJAC_VOZILA[ 5 ]);
- return 1;
- }
- //----------------------------------------------------------------------------//
- PreloadAnimLib(playerid, animlib[])
- {
- ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
- }
- public OnPlayerConnect( playerid )
- {
- PreloadAnimLib(playerid,"CARRY"); PreloadAnimLib(playerid,"DEALER");
- AktivanPosao[ playerid ] =0; PosaoBonus[ playerid ] =0; PosaoZarada[ playerid ] =0; IgracOprema[ playerid ] =0;
- IgracCP[ playerid ] = NEGATIVNA_LOKACIJA;
- //---//
- RemoveBuildingForPlayer(playerid, 5535, 1918.8516, -1776.3281, 16.9766, 0.25);
- RemoveBuildingForPlayer(playerid, 1524, 1910.1641, -1779.6641, 18.7500, 0.25);
- RemoveBuildingForPlayer(playerid, 5681, 1921.4844, -1778.9141, 18.5781, 0.25);
- RemoveBuildingForPlayer(playerid, 5409, 1918.8516, -1776.3281, 16.9766, 0.25);
- RemoveBuildingForPlayer(playerid, 1676, 1941.6563, -1778.4531, 14.1406, 0.25);
- RemoveBuildingForPlayer(playerid, 1676, 1941.6563, -1774.3125, 14.1406, 0.25);
- RemoveBuildingForPlayer(playerid, 955, 1928.7344, -1772.4453, 12.9453, 0.25);
- RemoveBuildingForPlayer(playerid, 1676, 1941.6563, -1771.3438, 14.1406, 0.25);
- RemoveBuildingForPlayer(playerid, 1676, 1941.6563, -1767.2891, 14.1406, 0.25);
- RemoveBuildingForPlayer(playerid, 1226, 1955.6641, -1793.0938, 16.3906, 0.25);
- //---//
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- AktivanPosao[ playerid ] =0; PosaoBonus[ playerid ] =0; PosaoZarada[ playerid ] =0; IgracOprema[ playerid ] =0; HidePlayerPosaoInfo( playerid );
- IgracCP[ playerid ] = NEGATIVNA_LOKACIJA;
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- if(AktivanPosao[ playerid ] == 1)
- {
- AktivanPosao[ playerid ] =0; PosaoBonus[ playerid ] =0; PosaoZarada[ playerid ] =0; IgracOprema[ playerid ] =0;
- IgracCP[ playerid ] =NEGATIVNA_LOKACIJA;
- DisablePlayerCheckpoint( playerid );
- HidePlayerPosaoInfo( playerid );
- SCM(playerid, 0x48977996,"[POSAO]: {FFFFFF}Napustili ste vozilo te je posao zavrsen!");
- }
- return 1;
- }
- CMD:utovar(playerid, params[])
- {
- if(AktivanPosao[ playerid ] == 1)
- {
- if(IsPlayerInRangeOfPoint(playerid,3.0, 1938.2350,-1773.1140,13.3828))
- {
- if(GetPlayerState( playerid ) == PLAYER_STATE_DRIVER)
- {
- if(POSAO_DOSTAVLJAC_VOZILA[GetPlayerVehicleID( playerid )] == 0)
- {
- new string[56];
- POSAO_DOSTAVLJAC_VOZILA[GetPlayerVehicleID( playerid )]=5;
- SCM(playerid, 0x48977996,"[UTOVAR]: {FFFFFF}Utovarili ste teret, dostavi ga lokacijama postavljenim crvenim markerom!");
- PlayerTextDrawHide(playerid,DostavljacInfo[ playerid ]);
- format(string,sizeof(string),"ZA DOSTAVITI: ~y~%d/5",POSAO_DOSTAVLJAC_VOZILA[GetPlayerVehicleID( playerid )]);
- PlayerTextDrawSetString(playerid,DostavljacInfo[ playerid ],string);
- PlayerTextDrawShow(playerid,DostavljacInfo[ playerid ]);
- }
- else return SCM(playerid,-1,"{E10000}(Info): {FFFFFF}U vozilu imas jos tereta kojeg moras dostaviti!");
- }
- else return SCM(playerid,-1,"{E10000}(Info): {FFFFFF}Morate biti u vozilu!");
- }
- else return SCM(playerid,-1,"{E10000}(Info): {FFFFFF}Nisi sa vozilom na mjestu za utovar tereta!");
- }
- else return SCM(playerid,-1,"{E10000}(Info): {FFFFFF}Ne radis ni jedan dio posla!");
- return 1;
- }
- CMD:prekiniposao(playerid, params[])
- {
- if(AktivanPosao[ playerid ] == 1)
- {
- new string[128];
- GivePlayerMoney(playerid,PosaoZarada[ playerid ]+PosaoBonus[ playerid ]);
- format(string,sizeof(string),"[INFO]: {FFFFFF}Trenutno si zaradio %d$ nakon obavljenog posla!",PosaoZarada[ playerid ]+PosaoBonus[ playerid ]);
- SCM(playerid,0x48977996,string);
- PosaoZarada[ playerid ] =0; PosaoBonus[ playerid ] =0; AktivanPosao[ playerid ] =0; IgracOprema[ playerid ] =0;
- if(IsPlayerAttachedObjectSlotUsed(playerid, DOSTAVLJAC_BR)) { RemovePlayerAttachedObject(playerid, DOSTAVLJAC_BR); }
- IgracCP[ playerid ]= NEGATIVNA_LOKACIJA;
- HidePlayerPosaoInfo( playerid );
- POSAO_DOSTAVLJAC_VOZILA[GetPlayerVehicleID( playerid )]=0;
- SetVehicleToRespawn(GetPlayerVehicleID( playerid ));
- RemovePlayerFromVehicle( playerid );
- SetPlayerSkin(playerid,IgracOprema[ playerid ]);
- DisablePlayerCheckpoint( playerid );
- }
- else SCM(playerid,-1,"{E10000}(Info): {FFFFFF}Nisi zaposlen kao dostavljac goriva!");
- return 1;
- }
- CMD:uzmigas(playerid, params[])
- {
- if(AktivanPosao[ playerid ] == 1)
- {
- if(!IsPlayerAttachedObjectSlotUsed(playerid, DOSTAVLJAC_BR))
- {
- if(GetPlayerState( playerid ) == PLAYER_STATE_ONFOOT)
- {
- new Float:X,Float:Y,Float:Z;
- for( new j=0;j<6;j++ )
- {
- GetVehiclePos( DOSTAVLJAC_VOZILA[j],X,Y,Z );
- if(IsPlayerInRangeOfPoint( playerid,3.0,X,Y,Z ))
- {
- if(POSAO_DOSTAVLJAC_VOZILA[ DOSTAVLJAC_VOZILA[j]] >= 1)
- {
- POSAO_DOSTAVLJAC_VOZILA[ DOSTAVLJAC_VOZILA[j]]--;
- ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,1,1,1,1,1,1);
- SetPlayerAttachedObject( playerid, DOSTAVLJAC_BR, 3632, 1, 0.002953, 0.469660, -0.009797, 269.851104, 88.443557, 0.000000, 0.804894, 1.000000, 0.822361 );
- SCM(playerid,-1,"{E10000}(Info): {FFFFFF}Ostavite bocu goriva na crveni marker!");
- return 1;
- }
- else
- {
- SCM(playerid,-1,"{E10000}(Info): {FFFFFF}Nemate vise tereta, otidite po novi");
- return 1;
- }
- }
- }
- }
- else return SCM(playerid,-1,"{E10000}(Info): {FFFFFF}Morate izaci iz vozila");
- }
- else return SCM(playerid,-1," {E10000}(Info): {FFFFFF}Vec si uzeo jednu bocu goriva!");
- }
- return 1;
- }
- CMD:test(playerid, params[])
- {
- SetPlayerPos(playerid, 1935.1696,-1794.7130,13.5469);
- return 1;
- }
- public ShowPlayerPosaoInfo( playerid )
- {
- new string[56];
- format(string,sizeof(string),"ZA DOSTAVITI: ~y~%d/5",POSAO_DOSTAVLJAC_VOZILA[GetPlayerVehicleID(playerid)]);
- DostavljacInfo[ playerid ] = CreatePlayerTextDraw(playerid,524.500000, 125.562500, string);
- PlayerTextDrawBackgroundColor(playerid,DostavljacInfo[ playerid ], 51);
- PlayerTextDrawFont(playerid,DostavljacInfo[ playerid ], 2);
- PlayerTextDrawLetterSize(playerid,DostavljacInfo[ playerid ], 0.155000, 0.716250);
- PlayerTextDrawColor(playerid,DostavljacInfo[ playerid ], -1);
- PlayerTextDrawSetOutline(playerid,DostavljacInfo[ playerid ], 1);
- PlayerTextDrawSetProportional(playerid,DostavljacInfo[ playerid ], 1);
- PlayerTextDrawSetSelectable(playerid,DostavljacInfo[ playerid ], 0);
- BacvaPrew[ playerid ] = CreatePlayerTextDraw(playerid,497.500000, 140.000000, " ");
- PlayerTextDrawFont(playerid,BacvaPrew[ playerid ], 5);
- PlayerTextDrawLetterSize(playerid,BacvaPrew[ playerid ], 0.449999, 1.600000);
- PlayerTextDrawColor(playerid,BacvaPrew[ playerid ], -1);
- PlayerTextDrawSetOutline(playerid,BacvaPrew[ playerid ], 0);
- PlayerTextDrawSetProportional(playerid,BacvaPrew[ playerid ], 1);
- PlayerTextDrawSetShadow(playerid,BacvaPrew[ playerid ], 0);
- PlayerTextDrawBackgroundColor(playerid,BacvaPrew[ playerid ], 0x00000000);
- PlayerTextDrawBoxColor(playerid,BacvaPrew[ playerid ], 45312);
- PlayerTextDrawTextSize(playerid,BacvaPrew[ playerid ], 28.500000, -21.437500);
- PlayerTextDrawSetSelectable(playerid,BacvaPrew[ playerid ], 0);
- PlayerTextDrawSetPreviewModel(playerid,BacvaPrew[ playerid ],3632);
- PlayerTextDrawSetPreviewRot(playerid,BacvaPrew[ playerid ],216.000000, 0.000000, 0.000000, 1.000000);
- format(string,sizeof(string),"ZARADA: ~y~%d~g~$",PosaoZarada[ playerid ]);
- ZaradaInfo[ playerid ] = CreatePlayerTextDraw(playerid,527.000000, 139.125000, string);
- PlayerTextDrawBackgroundColor(playerid,ZaradaInfo[ playerid ], 51);
- PlayerTextDrawFont(playerid,ZaradaInfo[ playerid ], 2);
- PlayerTextDrawLetterSize(playerid,ZaradaInfo[ playerid ], 0.154500, 0.589376);
- PlayerTextDrawColor(playerid,ZaradaInfo[ playerid ], -1);
- PlayerTextDrawSetOutline(playerid,ZaradaInfo[ playerid ], 1);
- PlayerTextDrawSetProportional(playerid,ZaradaInfo[ playerid ], 1);
- PlayerTextDrawSetSelectable(playerid,ZaradaInfo[ playerid ], 0);
- format(string,sizeof(string),"BONUS: ~y~+%d~g~$",PosaoBonus[ playerid ]);
- BonusInfo[ playerid ] = CreatePlayerTextDraw(playerid,533.000000, 145.250000, string);
- PlayerTextDrawBackgroundColor(playerid,BonusInfo[ playerid ], 51);
- PlayerTextDrawFont(playerid,BonusInfo[ playerid ], 2);
- PlayerTextDrawLetterSize(playerid,BonusInfo[ playerid ], 0.150000, 0.589375);
- PlayerTextDrawColor(playerid,BonusInfo[ playerid ], -1);
- PlayerTextDrawSetOutline(playerid,BonusInfo[ playerid ], 1);
- PlayerTextDrawSetProportional(playerid,BonusInfo[ playerid ], 1);
- PlayerTextDrawSetSelectable(playerid,BonusInfo[ playerid ], 0);
- format(string,sizeof(string),"UKUPNA ZARADA: ~y~%d~g~$",PosaoZarada[ playerid ]+PosaoBonus[ playerid ]);
- TotalZaradaInfo[ playerid ] = CreatePlayerTextDraw(playerid,554.500000, 166.687500, string);
- PlayerTextDrawBackgroundColor(playerid,TotalZaradaInfo[ playerid ], 51);
- PlayerTextDrawFont(playerid,TotalZaradaInfo[ playerid ], 1);
- PlayerTextDrawLetterSize(playerid,TotalZaradaInfo[ playerid ], 0.140000, 0.698750);
- PlayerTextDrawColor(playerid,TotalZaradaInfo[ playerid ], -1);
- PlayerTextDrawSetOutline(playerid,TotalZaradaInfo[ playerid ], 1);
- PlayerTextDrawSetProportional(playerid,TotalZaradaInfo[ playerid ], 1);
- PlayerTextDrawSetSelectable(playerid,TotalZaradaInfo[ playerid ], 0);
- PlayerTextDrawAlignment(playerid,TotalZaradaInfo[ playerid ], 2);
- Info0 = TextDrawCreate(495.500000, 116.125000, "usebox");
- TextDrawLetterSize(Info0, 0.000000, 6.780555);
- TextDrawTextSize(Info0, 615.000000, 0.000000);
- TextDrawAlignment(Info0, 1);
- TextDrawColor(Info0, 0);
- TextDrawUseBox(Info0, true);
- TextDrawBoxColor(Info0, 102);
- TextDrawSetShadow(Info0, 0);
- TextDrawSetOutline(Info0, 0);
- TextDrawFont(Info0, 0);
- Info1 = TextDrawCreate(496.000000, 103.875000, "usebox");
- TextDrawLetterSize(Info1, 0.000000, 0.995833);
- TextDrawTextSize(Info1, 614.500000, 0.000000);
- TextDrawAlignment(Info1, 1);
- TextDrawColor(Info1, 0);
- TextDrawUseBox(Info1, true);
- TextDrawBoxColor(Info1, 102);
- TextDrawSetShadow(Info1, 0);
- TextDrawSetOutline(Info1, 0);
- TextDrawFont(Info1, 0);
- Info2 = TextDrawCreate(616.000000, 114.187500, "LD_SPAC:white");
- TextDrawLetterSize(Info2, 0.000000, 0.000000);
- TextDrawTextSize(Info2, -121.500000, 0.437500);
- TextDrawAlignment(Info2, 1);
- TextDrawColor(Info2, -5963521);
- TextDrawSetShadow(Info2, 0);
- TextDrawSetOutline(Info2, 0);
- TextDrawBackgroundColor(Info2, -5963521);
- TextDrawFont(Info2, 4);
- Info3 = TextDrawCreate(510.000000, 103.687500, "INFO - DOSTAVLJAC");
- TextDrawLetterSize(Info3, 0.212500, 0.926251);
- TextDrawAlignment(Info3, 1);
- TextDrawColor(Info3, -1);
- TextDrawSetShadow(Info3, 0);
- TextDrawSetOutline(Info3, 1);
- TextDrawBackgroundColor(Info3, 51);
- TextDrawFont(Info3, 2);
- TextDrawSetProportional(Info3, 1);
- Info4 = TextDrawCreate(523.500000, 172.375000, "IIIIIIIIIIIIIIIIIIIIIIIII");
- TextDrawLetterSize(Info4, 0.187999, 0.768750);
- TextDrawAlignment(Info4, 1);
- TextDrawColor(Info4, -5963521);
- TextDrawUseBox(Info4, true);
- TextDrawBoxColor(Info4, 0);
- TextDrawSetShadow(Info4, 0);
- TextDrawSetOutline(Info4, 1);
- TextDrawBackgroundColor(Info4, 51);
- TextDrawFont(Info4, 2);
- TextDrawSetProportional(Info4, 1);
- Info5 = TextDrawCreate(575.000000, 122.937500, "New Textdraw");
- TextDrawLetterSize(Info5, 0.449999, 1.600000);
- TextDrawTextSize(Info5, 48.500000, 43.750000);
- TextDrawAlignment(Info5, 1);
- TextDrawColor(Info5, -1);
- TextDrawBoxColor(Info5, 0x00000000);
- TextDrawBackgroundColor(Info5, 0x00000000);
- TextDrawSetShadow(Info5, 0);
- TextDrawSetOutline(Info5, 1);
- TextDrawFont(Info5, 5);
- TextDrawSetProportional(Info5, 1);
- TextDrawSetPreviewModel(Info5, 428);
- TextDrawSetPreviewRot(Info5, 1.000000, 1.000000, 315.000000, 1.000000);
- TextDrawShowForPlayer(playerid, Info0); TextDrawShowForPlayer(playerid, Info1);
- TextDrawShowForPlayer(playerid, Info2); TextDrawShowForPlayer(playerid, Info3);
- TextDrawShowForPlayer(playerid, Info4); TextDrawShowForPlayer(playerid, Info5);
- PlayerTextDrawShow(playerid, DostavljacInfo[ playerid ]);
- PlayerTextDrawShow(playerid, BacvaPrew[ playerid ]);
- PlayerTextDrawShow(playerid, ZaradaInfo[ playerid ]);
- PlayerTextDrawShow(playerid, TotalZaradaInfo[ playerid ]);
- PlayerTextDrawShow(playerid, BonusInfo[ playerid ]);
- return 1;
- }
- public HidePlayerPosaoInfo( playerid )
- {
- TextDrawHideForPlayer(playerid, Info0); TextDrawHideForPlayer(playerid, Info1); TextDrawHideForPlayer(playerid, Info2);
- TextDrawHideForPlayer(playerid, Info3); TextDrawHideForPlayer(playerid, Info4); TextDrawHideForPlayer(playerid, Info5);
- PlayerTextDrawDestroy(playerid, DostavljacInfo[ playerid ]);
- PlayerTextDrawDestroy(playerid, BacvaPrew[ playerid ]);
- PlayerTextDrawDestroy(playerid, ZaradaInfo[ playerid ]);
- PlayerTextDrawDestroy(playerid, TotalZaradaInfo[ playerid ]);
- PlayerTextDrawDestroy(playerid, BonusInfo[ playerid ]);
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
- {
- if(IsPlayerAttachedObjectSlotUsed(playerid, DOSTAVLJAC_BR))
- {
- RemovePlayerFromVehicle( playerid );
- SetPlayerArmedWeapon( playerid, 0);
- ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,1,1,1,1,1,1);
- }
- new VID = GetPlayerVehicleID( playerid );
- if(VID == DOSTAVLJAC_VOZILA[ 0 ] || VID == DOSTAVLJAC_VOZILA[ 1 ] || VID == DOSTAVLJAC_VOZILA[ 2 ] || VID == DOSTAVLJAC_VOZILA[ 3 ] || VID == DOSTAVLJAC_VOZILA[ 4 ] || VID == DOSTAVLJAC_VOZILA[ 5 ])
- {
- if(AktivanPosao[ playerid ] == 1)
- {
- ShowPlayerPosaoInfo( playerid );
- if(IgracCP[ playerid ] == NEGATIVNA_LOKACIJA)
- {
- new rand = random(sizeof(LOKACIJE));
- new oprema = random(311)+1;
- if(oprema == 74) return oprema=75;
- SetPlayerCheckpoint(playerid, LOKACIJE[rand][ 0 ], LOKACIJE[rand][ 1 ], LOKACIJE[rand][ 2 ],2.0);
- IgracCP[ playerid ] = LOKACIJA;
- }
- }
- else
- {
- SCM(playerid,-1,"{E10000}(Info): {FFFFFF}Nisi zaposlen kao dostavljac goriva!");
- RemovePlayerFromVehicle( playerid );
- }
- }
- }
- else if(newstate == PLAYER_STATE_ONFOOT && oldstate == PLAYER_STATE_DRIVER) { HidePlayerPosaoInfo( playerid ); }
- return 1;
- }
- public OnPlayerEnterCheckpoint( playerid )
- {
- if(IgracCP[ playerid ] == LOKACIJA)
- {
- if(IsPlayerAttachedObjectSlotUsed(playerid, DOSTAVLJAC_BR))
- {
- new string[128];
- new bon=random( DOSTAVLJAC_BONUS + 15 );
- PosaoBonus[ playerid ]+=bon;
- PosaoZarada[ playerid ]+=ZARADA_PO_LOKACIJI;
- format(string,sizeof(string),"[INFO]: {FFFFFF}Zaradio si %d$ i bonus od %d$ za dostavljenu bocu goriva!", ZARADA_PO_LOKACIJI, bon);
- SCM(playerid, 0x48977996,string);
- RemovePlayerAttachedObject(playerid, DOSTAVLJAC_BR);
- IgracCP[ playerid ] = NEGATIVNA_LOKACIJA;
- DisablePlayerCheckpoint( playerid );
- ClearAnimations( playerid );
- }
- else return SCM(playerid,-1,"{E10000}(Info): {FFFFFF}Morate uzeti bocu goriva iz vozila kako bi je dostavio na ovoj lokaciji!");
- }
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == PosaoPick)
- {
- TextDrawShowForPlayer(playerid, PosaoTD); TextDrawShowForPlayer(playerid, PosaoTD1); TextDrawShowForPlayer(playerid, PosaoTD2); TextDrawShowForPlayer(playerid, PosaoTD3);
- TextDrawShowForPlayer(playerid, PosaoTD4); TextDrawShowForPlayer(playerid, PosaoTD5); TextDrawShowForPlayer(playerid, PosaoTD6);
- SelectTextDraw(playerid, 0xA3B4C5FF);
- }
- return 1;
- }
- public OnPlayerClickTextDraw(playerid, Text:clickedid)
- {
- if(_:clickedid != INVALID_TEXT_DRAW)
- {
- if(clickedid == PosaoTD4)
- {
- if(IsPlayerInRangeOfPoint(playerid,3.0, 1902.5525,-1776.3734,13.5469))
- {
- if(AktivanPosao[ playerid ] == 0)
- {
- new string[235];
- format(string, sizeof(string),"{FF7E19}Cestitamo! {FFFFFF}Upravo ste se zaposlili kao Dostavljac Goriva!\n\nU ovom poslu je potrebno da dostavite gorivo na odredenim lokacijama nakon utovara\n{FF7E19}Komande posla: {FFFFFF}/utovar /uzmigas /prekiniposao");
- SPD(playerid, D_POMOC, DIALOG_STYLE_MSGBOX, "Posao Dostavljac goriva", string, "Ok", "");
- SCM(playerid, -1,"{E10000}(Info): {FFFFFF}Udite u vozilo kako bi nastavili sa poslom!");
- AktivanPosao[ playerid ] = 1;
- IgracOprema[ playerid ] = GetPlayerSkin( playerid );
- SetPlayerSkin( playerid, 8 );
- }
- else return SCM(playerid,-1,"{E10000}(Info): {FFFFFF}Vec si zaposlen kao dostavljac goriva!");
- }
- else return SCM(playerid,-1,"{E10000}(Info): {FFFFFF}Nisite na mjestu za zaposljavanje!");
- }
- else if(clickedid == PosaoTD5)
- {
- TextDrawHideForPlayer(playerid, PosaoTD5);
- }
- TextDrawHideForPlayer(playerid, PosaoTD); TextDrawHideForPlayer(playerid, PosaoTD1); TextDrawHideForPlayer(playerid, PosaoTD2); TextDrawHideForPlayer(playerid, PosaoTD3);
- TextDrawHideForPlayer(playerid, PosaoTD4); TextDrawHideForPlayer(playerid, PosaoTD5); TextDrawHideForPlayer(playerid, PosaoTD6);
- CancelSelectTextDraw( playerid );
- }
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(PRESSED(KEY_FIRE))
- {
- if(IsPlayerAttachedObjectSlotUsed(playerid, DOSTAVLJAC_BR))
- {
- ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,1,1,1,1,1,1);
- SetPlayerArmedWeapon( playerid, 0 );
- }
- }
- return 1;
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement