Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Izradio : Nole Savan
- Godina Rada : 2014
- Vreme: Nmp
- Mesto Skripte: El Quebrados .. /gotostolar
- Obavestenje:
- Molio bi sve koji budu koristili ovu skriptu da ostave Credits...
- Ako bude neki bug prijavite mi .. Posto sam ovaj sistem radio
- direktno u svom modu , pa sam posle pravio FilterSkriptu..
- Mozda napravim u skorije vreme Update..
- Pozdrav , Nole.
- */
- #include <a_samp>
- #include <zcmd>
- #define SCM SendClientMessage
- #define SPC SetPlayerCheckpoint
- #define NOLEEEX 1
- #define NOLEEE 2
- #define CEKIC 3
- #pragma tabsize 0
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Job Stolar by Savan aka N0le");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Job Stolar by Savan aka N0le");
- print("----------------------------------\n");
- }
- enum nInfo
- {
- nPosao
- };
- new PlayerInfo[MAX_PLAYERS][nInfo];
- new drvanole[MAX_PLAYERS];
- new stolar[MAX_PLAYERS];
- forward NoleObjekat(playerid);
- public OnGameModeInit()
- {
- // STOLAR
- CreateObject(19631, 252.76077, 1425.76624, 9.80385, 0.00000, 0.00000, 0.00000);
- CreateObject(18635, 252.77628, 1425.53125, 9.81495, 0.00000, 0.00000, 0.00000);
- CreateObject(3415, -1432.36792, 1936.09766, 50.09436, 3.99200, 0.00000, -180.00000);
- CreateObject(3250, -1420.84192, 1942.37561, 50.10980, 0.00000, 0.00000, 270.61829);
- CreateObject(1458, -1439.24316, 1936.12817, 50.67940, 180.00000, 180.00000, -180.00000);
- CreateObject(1516, -1429.02844, 1947.12390, 50.68700, 0.00000, 0.00000, 0.00000);
- CreateObject(2180, -1431.14941, 1947.97876, 50.42510, 0.00000, 0.00000, 26.00000);
- CreateObject(2205, -1432.21924, 1946.33313, 50.30070, 0.00000, 0.00000, 0.00000);
- CreateObject(941, -1414.36890, 1939.11206, 50.56914, 0.00000, 0.00000, 90.00000);
- CreateObject(11745, -1414.75195, 1938.49255, 51.17980, 0.00000, 0.00000, 30.00000);
- CreateObject(941, -1412.88464, 1938.77051, 50.56910, 0.00000, 0.00000, 0.00000);
- CreateObject(941, -1414.06311, 1941.11877, 50.56910, 0.00000, 0.00000, 0.00000);
- CreateObject(19815, -1415.17834, 1939.86292, 51.50160, 0.00000, 0.00000, 90.00000);
- CreateObject(1463, -1428.58142, 1937.14978, 50.47510, 0.00000, 0.00000, 0.00000);
- CreateObject(1463, -1428.59558, 1936.17688, 50.83510, 0.00000, 0.00000, 0.00000);
- CreateObject(1463, -1428.59595, 1934.84192, 50.83510, 0.00000, 0.00000, 0.00000);
- CreateObject(1463, -1428.55591, 1935.53503, 51.04219, 0.00000, 0.00000, 0.00000);
- CreateObject(1463, -1428.52026, 1936.81396, 51.04219, 0.00000, 0.00000, 0.00000);
- CreateObject(1463, -1428.41699, 1936.24255, 51.37640, 0.00000, 0.00000, 0.00000);
- CreateObject(1463, -1428.54138, 1935.29419, 51.28040, 0.00000, 0.00000, 0.00000);
- CreateObject(1463, -1441.55017, 1937.13330, 50.77342, 0.00000, 0.00000, 0.00000);
- CreateObject(1463, -1443.62769, 1937.11487, 50.81968, 0.00000, 0.00000, 0.00000);
- CreateObject(1463, -1446.01392, 1936.95581, 50.83510, 0.00000, 0.00000, 0.00000);
- CreateObject(1463, -1445.87537, 1934.83215, 51.07657, 0.00000, 0.00000, 0.00000);
- CreateObject(1463, -1443.93835, 1935.21753, 50.94912, 0.00000, 0.00000, 0.00000);
- CreateObject(1463, -1441.94214, 1934.83606, 51.01842, 0.00000, 0.00000, 0.00000);
- CreateObject(1463, -1439.86255, 1934.98975, 50.96644, 0.00000, 0.00000, 0.00000);
- CreateObject(1463, -1445.87537, 1934.83215, 51.07657, 0.00000, 0.00000, 0.00000);
- // Label
- Create3DTextLabel("{0084e3}[ Y ]\n{CFCFCF}[ Da pokupite drva ]",0x9EC73DAA,-1444.0920,1936.2720,51.5349,7.0, 0);
- Create3DTextLabel("{0084e3}[ Y ]\n{CFCFCF}[ Da napravite namestaj ]",0x9EC73DAA,-1413.4330,1939.9869,51.1372,7.0, 0);
- Create3DTextLabel("{0084e3}[ Y ]\n{CFCFCF}[ Da se zaposlite kao 'Stolar' ]",0x9EC73DAA,-1424.5255,1941.4037,51.6098,7.0, 0);
- Create3DTextLabel("{0084e3}[ ALT ]\n{CFCFCF}[ Skladiste ]\n{0084e3}Da ostavite namestaj",0x9EC73DAA,-1433.9559,1936.7994,51.3631,7.0, 0);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SCM(playerid, -1 ,"Posao Stolar v0.1 by Savan")
- drvanole[playerid] = 0;
- stolar[playerid] = 0;
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- if(IsPlayerInRangeOfPoint(playerid,9.0,-1413.4332,1940.0472,51.1345))
- {
- DisablePlayerCheckpoint(playerid);
- drvanole[playerid] = 0;
- }
- else if(IsPlayerInRangeOfPoint(playerid,9.0,-1433.9719,1936.1836,51.3633))
- {
- DisablePlayerCheckpoint(playerid);
- stolar[playerid] = 0;
- }
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(newkeys == KEY_YES)
- {
- if(IsPlayerInRangeOfPoint(playerid,5, -542.6563,2593.4795,53.5530))
- {
- if(PlayerInfo[playerid][nPosao] != 0) return SCM(playerid, -1, "{0084e3}Vec imas posao");
- SCM(playerid, -1, "{0084e3}» {CFCFCF}Zaposlili ste se kao {0084e3}Stolar {0084e3}«");
- PlayerInfo[playerid][nPosao] = 1;
- return 1;
- }
- }
- if(newkeys == KEY_YES)
- {
- if(IsPlayerInRangeOfPoint(playerid,2.0,-1443.4667,1936.2294,51.5228))
- {
- if(PlayerInfo[playerid][nPosao] != 1) return SCM(playerid, -1, "Nisi stolar");
- drvanole[playerid] = 1;
- ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
- SetPlayerAttachedObject(playerid, NOLEEEX, 1463, 1,0.20,0.36,0.0,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
- SPC(playerid,-1413.4332,1940.0472,51.1345,1.0);
- SCM(playerid, -1, "{0084e3}» {CFCFCF}Pokupili ste drva sada idite iza kuce i napravite namestaj {0084e3}«");
- return 1;
- }
- }
- if(newkeys == KEY_YES)
- {
- if(IsPlayerInRangeOfPoint(playerid,5, -1413.4332,1940.0472,51.1345))
- {
- if(PlayerInfo[playerid][nPosao] != 1) return SCM(playerid, -1, "Nisi stolar");
- ClearAnimations(playerid);
- if(!IsPlayerAttachedObjectSlotUsed(playerid, NOLEEEX)) return SCM(playerid, -1, "Nisi uzeo drva !");
- RemovePlayerAttachedObject(playerid,NOLEEEX);
- SetPlayerAttachedObject(playerid, CEKIC, 18635, 6, -0.013999, 0.000000, -0.060999, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
- ApplyAnimation(playerid,"BASEBALL","BAT_PART", 4.0, 1, 0, 0, 0, 0);
- SetTimer("stolar1", 1000, false);//
- SetTimer("stolar2", 2000, false);//
- SetTimer("stolar3", 3000, false);//
- SetTimer("stolar4", 4000, false);//
- SetTimer("stolar5", 5000, false);//
- SetTimer("stolar6", 6000, false);//
- SetTimer("stolar7", 7000, false);//
- SetTimer("stolar8", 8000, false);//
- SetTimer("stolar9", 9000, false);//
- SetTimer("stolar10", 10000, false);//
- SetTimer("stolar11", 11000, false);//
- SetTimer("stolar12", 12000, false);//
- SetTimer("stolar13", 13000, false);//
- SetTimer("stolar14", 14000, false);//
- SetTimer("stolar15", 15000, false);//
- SetTimer("stolar16", 16000, false);//
- SetTimer("stolar17", 17000, false);//
- SetTimer("stolar18", 18000, false);//
- SetTimer("stolar19", 19000, false);//
- SetTimer("stolar20", 20000, false);//
- SCM(playerid, -1, "{0084e3}» {CFCFCF}Vi pravite namestaj , sacekajte malo {0084e3}«");
- TogglePlayerControllable(playerid, 0);
- }
- return 1;
- }
- if(newkeys == KEY_WALK)
- {
- if(IsPlayerInRangeOfPoint(playerid,5.0, -1433.9719,1936.1836,51.3633))
- {
- if(PlayerInfo[playerid][nPosao] != 1) return SCM(playerid, -1, "Nisi stolar");
- if(!IsPlayerAttachedObjectSlotUsed(playerid, NOLEEE)) return SCM(playerid, -1, "Nisi napravio namestaj !");
- ApplyAnimation(playerid, "CARRY", "putdwn", 3.0, 0, 0, 0, 0, 0);
- NoleObjekat(playerid);
- new Float:nolex, Float:noley, Float:nolez;
- GetPlayerPos(playerid, nolex,noley,nolez);
- CreateObject(2346, nolex, noley,nolez-1.0,0.0,0.0,0.0);
- new savantebra[128];
- new noletebra;
- noletebra = random(40);
- format(savantebra, sizeof(savantebra), "{0084e3}» {CFCFCF}Napravili ste Namestaj i {0084e3}'Stolarija Devic d.0.0', {CFCFCF}\nVam je isplatila sumu novca od %d $ . " , noletebra);
- SendClientMessage(playerid, -1, savantebra);
- GivePlayerMoney(playerid, noletebra);
- return 1;
- }
- }
- return 1;
- }
- forward stolar1(playerid);
- public stolar1(playerid)
- {
- ApplyAnimation(playerid,"BASEBALL","BAT_PART", 4.0, 1, 0, 0, 0, 0);
- GameTextForPlayer(playerid,"~y~Pravljenje ~g~Namestaja~y~ u toku",1000,3);
- return 1;
- }
- forward stolar2(playerid);
- public stolar2(playerid)
- {
- ApplyAnimation(playerid,"BASEBALL","BAT_PART", 4.0, 1, 0, 0, 0, 0);
- GameTextForPlayer(playerid,"~y~Pravljenje ~g~Namestaja~y~ u toku",1000,3);
- return 1;
- }
- forward stolar3(playerid);
- public stolar3(playerid)
- {
- ApplyAnimation(playerid,"BASEBALL","BAT_PART", 4.0, 1, 0, 0, 0, 0);
- GameTextForPlayer(playerid,"~y~Pravljenje ~g~Namestaja~y~ u toku",1000,3);
- return 1;
- }
- forward stolar4(playerid);
- public stolar4(playerid)
- {
- ApplyAnimation(playerid,"BASEBALL","BAT_PART", 4.0, 1, 0, 0, 0, 0);
- GameTextForPlayer(playerid,"~y~Pravljenje ~g~Namestaja~y~ u toku",1000,3);
- return 1;
- }
- forward stolar5(playerid);
- public stolar5(playerid)
- {
- ApplyAnimation(playerid,"BASEBALL","BAT_PART", 4.0, 1, 0, 0, 0, 0);
- GameTextForPlayer(playerid,"~y~Pravljenje ~g~Namestaja~y~ u toku",1000,3);
- return 1;
- }
- forward stolar6(playerid);
- public stolar6(playerid)
- {
- ApplyAnimation(playerid,"BASEBALL","BAT_PART", 4.0, 1, 0, 0, 0, 0);
- GameTextForPlayer(playerid,"~y~Pravljenje ~g~Namestaja~y~ u toku",1000,3);
- return 1;
- }
- forward stolar7(playerid);
- public stolar7(playerid)
- {
- ApplyAnimation(playerid,"BASEBALL","BAT_PART", 4.0, 1, 0, 0, 0, 0);
- GameTextForPlayer(playerid,"~y~Pravljenje ~g~Namestaja~y~ u toku",1000,3);
- return 1;
- }
- forward stolar8(playerid);
- public stolar8(playerid)
- {
- ApplyAnimation(playerid,"BASEBALL","BAT_PART", 4.0, 1, 0, 0, 0, 0);
- GameTextForPlayer(playerid,"~y~Pravljenje ~g~Namestaja~y~ u toku",1000,3);
- return 1;
- }
- forward stolar9(playerid);
- public stolar9(playerid)
- {
- ApplyAnimation(playerid,"BASEBALL","BAT_PART", 4.0, 1, 0, 0, 0, 0);
- GameTextForPlayer(playerid,"~y~Pravljenje ~g~Namestaja~y~ u toku",1000,3);
- return 1;
- }
- forward stolar10(playerid);
- public stolar10(playerid)
- {
- ApplyAnimation(playerid,"BASEBALL","BAT_PART", 4.0, 1, 0, 0, 0, 0);
- GameTextForPlayer(playerid,"~y~Pravljenje ~g~Namestaja~y~ u toku",1000,3);
- return 1;
- }
- forward stolar11(playerid);
- public stolar11(playerid)
- {
- ApplyAnimation(playerid,"BASEBALL","BAT_PART", 4.0, 1, 0, 0, 0, 0);
- GameTextForPlayer(playerid,"~y~Pravljenje ~g~Namestaja~y~ u toku",1000,3);
- return 1;
- }
- forward stolar12(playerid);
- public stolar12(playerid)
- {
- ApplyAnimation(playerid,"BASEBALL","BAT_PART", 4.0, 1, 0, 0, 0, 0);
- GameTextForPlayer(playerid,"~y~Pravljenje ~g~Namestaja~y~ u toku",1000,3);
- return 1;
- }
- forward stolar13(playerid);
- public stolar13(playerid)
- {
- ApplyAnimation(playerid,"BASEBALL","BAT_PART", 4.0, 1, 0, 0, 0, 0);
- GameTextForPlayer(playerid,"~y~Pravljenje ~g~Namestaja~y~ u toku",1000,3);
- return 1;
- }
- forward stolar14(playerid);
- public stolar14(playerid)
- {
- ApplyAnimation(playerid,"BASEBALL","BAT_PART", 4.0, 1, 0, 0, 0, 0);
- GameTextForPlayer(playerid,"~y~Pravljenje ~g~Namestaja~y~ u toku",1000,3);
- return 1;
- }
- forward stolar15(playerid);
- public stolar15(playerid)
- {
- ApplyAnimation(playerid,"BASEBALL","BAT_PART", 4.0, 1, 0, 0, 0, 0);
- GameTextForPlayer(playerid,"~y~Pravljenje ~g~Namestaja~y~ u toku",1000,3);
- return 1;
- }
- forward stolar16(playerid);
- public stolar16(playerid)
- {
- ApplyAnimation(playerid,"BASEBALL","BAT_PART", 4.0, 1, 0, 0, 0, 0);
- GameTextForPlayer(playerid,"~y~Pravljenje ~g~Namestaja~y~ u toku",1000,3);
- return 1;
- }
- forward stolar17(playerid);
- public stolar17(playerid)
- {
- ApplyAnimation(playerid,"BASEBALL","BAT_PART", 4.0, 1, 0, 0, 0, 0);
- GameTextForPlayer(playerid,"~y~Pravljenje ~g~Namestaja~y~ u toku",1000,3);
- return 1;
- }
- forward stolar18(playerid);
- public stolar18(playerid)
- {
- ApplyAnimation(playerid,"BASEBALL","BAT_PART", 4.0, 1, 0, 0, 0, 0);
- GameTextForPlayer(playerid,"~y~Pravljenje ~g~Namestaja~y~ u toku",1000,3);
- return 1;
- }
- forward stolar19(playerid);
- public stolar19(playerid)
- {
- ApplyAnimation(playerid,"BASEBALL","BAT_PART", 4.0, 1, 0, 0, 0, 0);
- GameTextForPlayer(playerid,"~y~Pravljenje ~g~Namestaja~y~ u toku",1000,3);
- return 1;
- }
- forward stolar20(playerid);
- public stolar20(playerid)
- {
- ClearAnimations(playerid);
- GameTextForPlayer(playerid,"~y~Zavrsavanje namestaja\n~w~Namestaj napravljen",3000,3);
- TogglePlayerControllable(playerid, 1);
- ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
- SPC(playerid,-1433.9719,1936.1836,51.3633,1.0);
- SetPlayerAttachedObject(playerid, NOLEEE, 2346, 1,0.10,0.36,0.25,0.0,90.0, 0.0, 0.4, 0.3, 0.6);
- stolar[playerid] = 1;
- SCM(playerid, -1, "{0084e3}» {CFCFCF}Napravili ste namestaj odnesite ga do skladista i podignite novac ! {0084e3}«");
- return 1;
- }
- NoleObjekat(playerid)
- {
- if(IsPlayerAttachedObjectSlotUsed(playerid,NOLEEE)) RemovePlayerAttachedObject(playerid,NOLEEE);
- }
- CMD:gotostolar(playerid, params[])
- {
- #pragma unused help
- // (ODCEKIRAJ AKO CES _zA ADMINE !!) if(PlayerInfo[playerid][nAdmin] < 1) return SCM(playerid, -1, "Niste ovlasceni da koristite ovu komandu!");
- if(GetPlayerState(playerid) == 2)
- {
- new idv = GetPlayerVehicleID(playerid);
- SetVehiclePos(idv,-1435.5450,1943.9553,51.3768);
- }
- else
- {
- SetPlayerPos(playerid,-1435.5450,1943.9553,51.3768);
- }
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid,0);
- SCM(playerid,-1,"Tp si se do stolara .. !");
- return 1;
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment