Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ========== [ Pocetak FilterSkripte ] ========== //
- // Posao Bus Vozac By:Tony (((NE MENJAJ KREDITS)))
- // ========== [ Include ] ========== //
- #include <a_samp>
- #include <zcmd>
- // ========== [ Boje ] ========== //
- #define COLOR_DARKGOLD 0x808000AA
- #define COLOR_RED 0xFF0000AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_YELLOWGREEN 0xADFF2FAA
- forward UnfreezePlayer(playerid);
- // ========== [ Enum Pinfo NE DIRAJ!!! ] ========== //
- enum pInfo
- {
- pPosaoUgovor,
- pLevel,
- pPosao,
- pOprema,
- };
- new PlayerInfo[MAX_PLAYERS][pInfo];
- // ========== [ NE DIRAJ ] ========== //
- new BusJob[256];
- // ========== [ Busevi ] ========== //
- public OnFilterScriptInit()
- {
- AddStaticVehicle(437,1804.5135,-1931.1837,13.5578,0.7978,105,20); // Bus1
- AddStaticVehicle(437,1800.1434,-1931.1538,13.5507,1.6479,123,20); // Bus2
- AddStaticVehicle(437,1795.4452,-1931.2524,13.5483,0.9752,98,20); // Bus3
- AddStaticVehicle(437,1790.9561,-1931.1577,13.5614,0.3414,54,7); // Bus4
- AddStaticVehicle(437,1786.0616,-1931.1292,13.5378,359.1724,125,21); // Bus5
- AddStaticVehicle(437,1781.4387,-1931.2439,13.5490,0.3812,79,7); // Bus6
- AddStaticVehicle(437,1776.9261,-1931.1481,13.5474,2.1805,87,7); // Bus7
- }
- // ========== [ ! ] ========== //
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- return 1;
- }
- // ========== [ Komanda kad udjete u vozilo da vam izbaci dialog kako se koriste komande !! ] ========== //
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 437)
- {
- SendClientMessage(playerid, COLOR_RED, "Da krenete sa Prevozenjem putnika kucaj /busp");
- SendClientMessage(playerid, COLOR_RED,"Ako niste uzeli opremu kucajte /busoprema");
- }
- return 0;
- }
- ////////////////////////////////////////////////////////////////////////////////
- public OnPlayerEnterCheckpoint(playerid)
- {
- if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 437)
- {
- if(BusJob[playerid] == 1){
- BusJob[playerid] = 2;
- SetPlayerCheckpoint(playerid,1807.5831,-1890.8634,13.5418);
- SendClientMessage(playerid,COLOR_YELLOWGREEN,"Pratite markere i bit ce te placeni");
- TogglePlayerControllable(playerid,0);
- SetTimerEx("UnfreezePlayer",3000,false,"d",playerid);
- GameTextForPlayer(playerid, "~y~Pricekajte da putnici udju/izadju iz busa.",1500,6);
- return 1;
- }
- if(BusJob[playerid] == 2){
- BusJob[playerid] = 3;
- SetPlayerCheckpoint(playerid,1823.7743,-1628.7023,13.5162);
- TogglePlayerControllable(playerid,0);
- SetTimerEx("UnfreezePlayer",3000,false,"d",playerid);
- GameTextForPlayer(playerid, "~y~Pricekajte da putnici udju/izadju iz busa.",1500,6);
- return 1;
- }
- if(BusJob[playerid] == 3){
- BusJob[playerid] = 4;
- SetPlayerCheckpoint(playerid,2041.0093,-1649.6680,13.6818);
- TogglePlayerControllable(playerid,0);
- SetTimerEx("UnfreezePlayer",3000,false,"d",playerid);
- GameTextForPlayer(playerid, "~y~Pricekajte da putnici udju/izadju iz busa.",1500,6);
- return 1;
- }
- if(BusJob[playerid] == 4){
- BusJob[playerid] = 5;
- SetPlayerCheckpoint(playerid,2080.6152,-1791.8184,13.5194);
- TogglePlayerControllable(playerid,0);
- SetTimerEx("UnfreezePlayer",3000,false,"d",playerid);
- GameTextForPlayer(playerid, "~y~Pricekajte da putnici udju/izadju iz busa.",1500,6);
- return 1;
- }
- if(BusJob[playerid] == 5){
- BusJob[playerid] = 6;
- SetPlayerCheckpoint(playerid,2078.4829,-1917.9031,13.4651);
- TogglePlayerControllable(playerid,0);
- SetTimerEx("UnfreezePlayer",3000,false,"d",playerid);
- GameTextForPlayer(playerid, "~y~Pricekajte da putnici udju/izadju iz busa.",1500,6);
- return 1;
- }
- if(BusJob[playerid] == 6){
- BusJob[playerid] = 7;
- SetPlayerCheckpoint(playerid,1847.4159,-2164.2288,13.5156);
- TogglePlayerControllable(playerid,0);
- SetTimerEx("UnfreezePlayer",3000,false,"d",playerid);
- GameTextForPlayer(playerid, "~y~Pricekajte da putnici udju/izadju iz busa.",1500,6);
- return 1;
- }
- if(BusJob[playerid] == 7){
- BusJob[playerid] = 8;
- SetPlayerCheckpoint(playerid,1532.7483,-1942.1265,18.3391);
- TogglePlayerControllable(playerid,0);
- SetTimerEx("UnfreezePlayer",3000,false,"d",playerid);
- GameTextForPlayer(playerid, "~y~Pricekajte da putnici udju/izadju iz busa.",1500,6);
- return 1;
- }
- if(BusJob[playerid] == 8){
- BusJob[playerid] = 9;
- SetPlayerCheckpoint(playerid,1617.0437,-1875.9316,13.5161);
- TogglePlayerControllable(playerid,0);
- SetTimerEx("UnfreezePlayer",3000,false,"d",playerid);
- GameTextForPlayer(playerid, "~y~Pricekajte da putnici udju/izadju iz busa.",1500,6);
- return 1;
- }
- if(BusJob[playerid] == 9){
- BusJob[playerid] = 10;
- SetPlayerCheckpoint(playerid,1694.4108,-1837.9043,13.5889);
- TogglePlayerControllable(playerid,0);
- SetTimerEx("UnfreezePlayer",3000,false,"d",playerid);
- GameTextForPlayer(playerid, "~y~Pricekajte da putnici udju/izadju iz busa.",1500,6);
- return 1;
- }
- if(BusJob[playerid] == 10){
- BusJob[playerid] = 11;
- SetPlayerCheckpoint(playerid,1759.6416,-1887.8652,13.6923,90.2938);
- TogglePlayerControllable(playerid,0);
- SetTimerEx("UnfreezePlayer",3000,false,"d",playerid);
- GameTextForPlayer(playerid, "~y~Pricekajte da putnici izadju iz busa.",1500,6);
- return 1;
- }
- if(BusJob[playerid] == 11){
- BusJob[playerid] = 0;
- DisablePlayerCheckpoint(playerid);
- SendClientMessage(playerid,COLOR_YELLOWGREEN, "_________________PLATA__________________");
- SendClientMessage(playerid,COLOR_YELLOWGREEN,"Zavrsili ste sa poslom i dobili platu iznos:1500$.");
- SendClientMessage(playerid,COLOR_YELLOWGREEN, "________________________________________");
- GivePlayerMoney(playerid,1500); //stavite koliko zelite moja procena je 1500$
- }
- }
- return 1;
- }
- ////////////////////////////////////////////////////////////////////////////////
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- if(BusJob[playerid] > 0)
- {
- BusJob[playerid] = 0;
- SendClientMessage(playerid,COLOR_YELLOWGREEN, "________________________________________");
- SendClientMessage(playerid, COLOR_RED, "Napustili ste posao, necete dobiti novac.");
- SendClientMessage(playerid,COLOR_YELLOWGREEN, "________________________________________");
- DisablePlayerCheckpoint(playerid);
- }
- }
- ////////////////////////////////////////////////////////////////////////////////
- CMD:busoprema(playerid,params[])
- {
- SetPlayerSkin(playerid, 253);
- SendClientMessage(playerid,COLOR_YELLOWGREEN, "________________OPREMA__________________");
- SendClientMessage(playerid,COLOR_YELLOWGREEN,"Uzeli ste opremu, mozete poceti sa radom!");
- SendClientMessage(playerid,COLOR_YELLOWGREEN, "________________________________________");
- return 1;
- }
- ////////////////////////////////////////////////////////////////////////////////
- COMMAND:posaobus(playerid, params[])
- {
- if(PlayerInfo[playerid][pPosao] == 0)
- {
- if(!IsPlayerInRangeOfPoint(playerid, 2012.6134,-1729.3796,13.1536,10))
- {
- PlayerInfo[playerid][pPosao] = 1;
- PlayerInfo[playerid][pPosaoUgovor] = 3;
- SendClientMessage(playerid,COLOR_YELLOWGREEN, "_________________Bus Vozac__________________");
- SendClientMessage(playerid,COLOR_YELLOWGREEN, "Cestitamo, postali ste Bus Vozac!");
- SendClientMessage(playerid,COLOR_YELLOWGREEN, "Komande posla : /busoprema Pocni posao sa/busp!");
- SendClientMessage(playerid,COLOR_YELLOWGREEN, "________________________________________");
- }
- }
- else
- SendClientMessage(playerid,0xADFF2FAA, "Vec imate posao!");
- return 1;
- }
- ////////////////////////////////////////////////////////////////////////////////
- CMD:busp(playerid,params[])
- {
- if(PlayerInfo[playerid][pPosao] == 0) return SendClientMessage(playerid,COLOR_RED,"Niste zaposlen kao Bus Vozac");
- if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 437)
- {
- BusJob[playerid] = 1;
- new name[MAX_PLAYER_NAME], string[48];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "%s Je sada Bus Vozac.", name );
- SendClientMessageToAll(COLOR_YELLOW, string);
- SetPlayerCheckpoint(playerid,2012.6134,-1729.3796,13.1536,10);
- SendClientMessage(playerid,COLOR_YELLOWGREEN, "________________________________________");
- SendClientMessage(playerid,COLOR_YELLOW,"Prati markere da bi dobio novac!");
- SendClientMessage(playerid,COLOR_YELLOWGREEN, "________________________________________");
- }
- return 1;
- }
- ////////////////////////////////////////////////////////////////////////////////
- public UnfreezePlayer(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- TogglePlayerControllable(playerid,1);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement