Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- new string[256];
- format(string,sizeof(string), " %s ulazi u vozilo.", GetName(playerid));
- ProxDetector(20.0, playerid, string, PROX,PROX,PROX,PROX,PROX);
- SCM(playerid,-1,""srw_boja"UB:RP | "BELA"Da upalite motor kliknite tipku 2(gornju)");
- new Float:Poz[3]; GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- if(!ispassenger)
- {
- for(new i; i < sizeof(VoziloInfo); i++)
- {
- if(VoziloInfo[i][vID] == vehicleid)
- {
- if(VoziloInfo[i][vImaVlasnika] == 1)
- {
- if(PlayerInfo[playerid][pPosedovanjeAuta] == i || VoziloInfo[i][vZakljucan] == 0 || PlayerInfo[playerid][pAdmin] == 6)
- {
- if(PlayerInfo[playerid][pAdmin] == 6 || PlayerInfo[playerid][pAdmin] == 7) va_SendClientMessage(playerid,-1,"UB:RP | "srw_boja"Ulazite u vozilo ID: %d!",i);
- format(string,sizeof(string), ""srw_boja"Privatno Auto | "BELA"Vlasnik: "srw_boja"%s", VoziloInfo[i][vVlasnik]);
- SCM(playerid,-1,string);
- return 1;
- }
- else
- {
- SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- format(string,sizeof(string), ""srw_boja"Auto Zakljucan | "BELA"Vlasnik: %s", VoziloInfo[i][vVlasnik]);
- SCM(playerid,-1,string);
- return 1;
- }
- }
- }
- }
- if(vehicleid == IzlozbenoAuto)
- {
- SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SCM(playerid,-1,"UB:RP | "CRVENA"Ne mozete uci u izlozbeno vozilo!");
- }
- if(AutoSalonVozila(vehicleid))
- {
- SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SCM(playerid,-1,"UB:RP | "CRVENA"Ne mozete uci u izlozbeno vozilo!");
- }
- }
- //
- return 1;
- }
- //
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(newstate == PLAYER_STATE_DRIVER)
- {
- for(new i = 0; i < sizeof(VoziloInfo); i++)
- {
- if(VoziloInfo[i][vID] == vozilo)
- {
- new cijena = CijeneAuta(GetVehicleModel(GetPlayerVehicleID(playerid)));
- if(VoziloInfo[i][vImaVlasnika] == 0)
- {
- if(PlayerInfo[playerid][pAdmin] == 6) va_SendClientMessage(playerid,-1,"[UB:RP] "ZELENA"Ulazite u vozilo ID: %d!",i);
- SCM(playerid,-1,""SPLAVA"Polovan auto na prodaju | /kupiauto | /izlaz");
- va_SendClientMessage(playerid,-1,""SPLAVA"Cijena: "BELA"%d$ | "SPLAVA"Model: "BELA"%s",AutoSalon[cijena][1]/2, ImeVozila[GetVehicleModel(vozilo) - 400]);
- UsaoAutoProdaja[playerid] = i; TogglePlayerControllable(playerid, 0);
- return 1;
- }
- }
- }
- }
- //-----//
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment