Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- new sendername[MAX_PLAYER_NAME];
- new ulaziuv[64];
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(ulaziuv, sizeof(ulaziuv), " %s ulazi u vozilo.", sendername);
- ProxDetector(30.0, playerid, ulaziuv, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- 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 || PlayerInfo[playerid][pAdmin] == 5 || PlayerInfo[playerid][pAdmin] == 7)
- {
- if(PlayerInfo[playerid][pAdmin] == 5) SCMF(playerid,-1,"[MC:RP] "ZELENA"Ulazite u vozilo ID: %d!",i);
- if(PlayerInfo[playerid][pAdmin] == 6) SCMF(playerid,-1,"[MC:RP] "ZELENA"Ulazite u vozilo ID: %d!",i);
- if(PlayerInfo[playerid][pAdmin] == 7) SCMF(playerid,-1,"[MC:RP] "ZELENA"Ulazite u vozilo ID: %d!",i);
- new string[128];
- format(string,sizeof(string), ""SPLAVA"Privatno Auto | "SIVA"Vlasnik: "SPLAVA"%s", VoziloInfo[i][vVlasnik]);
- SCM(playerid,-1,string);
- return 1;
- }
- else
- {
- new engine, lights, alarm, doors, bonnet, boot, objective;
- new string[128]; SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- format(string,sizeof(string), ""SPLAVA"Auto Zakljucan | "SIVA"Vlasnik: %s", VoziloInfo[i][vVlasnik]);
- SCM(playerid,-1,string);
- GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
- SetVehicleParamsEx(vehicleid, engine, lights, 1, doors, bonnet, boot, objective);
- return 1;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment