Hydra. wrote on June 9, 2020, 6:28 pm:
Pa gledaj po OnPlayerEnterVehicle, OnPlayerExitVehicle, OnPlayerStateChange
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new sendername;
new stringsfg;
GetPlayerName(playerid, sendername, sizeof(sendername));
format(stringsfg, sizeof(stringsfg), " %s ulazi u vozilo.", sendername);
ProxDetector(30.0, playerid, stringsfg, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
new Float:Poz; GetPlayerPos(playerid, Poz, Poz, Poz);
SCM(playerid,-1,""ZELENA" "BELA"Ulazite u vozilo! TEMPOMAT - Y !");
SCM(playerid,-1,""ZELENA" "BELA"Paljenje/Gasenje Svetla - /svetlaon /svetlaoff!");
for(new i = 0; i < MAX_AUTA; i++)
{
if(VoziloInfo == vehicleid)
{
if(VoziloInfo == 1)
{
if(PlayerInfo >= 5)
{
new string;
format(string,sizeof(string), ""PPLAVA"Privatno Auto | "SIVA"Vlasnik: "PPLAVA"%s | "ZELENA"ID: %i", VoziloInfo, i);
SCM(playerid,-1,string);
}
else if(PlayerInfo == i || PlayerInfo == i)
{
SCM(playerid,-1,"[IG:RPG] "ZELENA"Ulazite u vase vozilo!");
}
else if(VoziloInfo == 0)
{
SCM(playerid,-1,""PPLAVA"Privatno Vozilo");
}
else
{
SetPlayerPos(playerid, Poz, Poz, Poz);
SCM(playerid,-1,""BELA"Vozilo "CRVENA"Zakljucano");
}
}
return 1;
}
}
for(new i = 0; i < MAX_MOTORA; i++)
{
if(MotorInfo == vehicleid)
{
if(MotorInfo == 1)
{
if(PlayerInfo >= 5)
{
new string;
format(string,sizeof(string), ""PPLAVA"Privatni Motor | "SIVA"Vlasnik: "PPLAVA"%s | "ZELENA"ID: %i", MotorInfo, i);
SCM(playerid,-1,string);
}
else if(PlayerInfo == i)
{
SCM(playerid,-1,"[IG:RPG] "ZELENA"Sedate na vas motor!");
}
else if(MotorInfo == 0)
{
SCM(playerid,-1,""ZUTA"Privatni Motor");
}
else
{
SetPlayerPos(playerid, Poz, Poz, Poz);
SCM(playerid,-1,""BELA"Motor "CRVENA"Zakljucan");
}
}
return 1;
}
}
for(new i = 0; i < MAX_AVIONA; i++)
{
if(AvionInfo == vehicleid)
{
if(AvionInfo == 1)
{
if(PlayerInfo >= 5)
{
new string;
format(string,sizeof(string), ""PPLAVA"Privatna Letelica | "SIVA"Vlasnik: "PPLAVA"%s | "ZELENA"ID: %i", AvionInfo, i);
SCM(playerid,-1,string);
}
else if(PlayerInfo == i)
{
SCM(playerid,-1,"[IG:RPG] "ZELENA"Ulazite u vasu letelicu!");
}
else if(AvionInfo == 0)
{
SCM(playerid,-1,""CRVENA"Privatna Letelica");
}
else
{
SetPlayerPos(playerid, Poz, Poz, Poz);
SCM(playerid,-1,""CRVENA"Letelica Zakljucana");
}
}
return 1;
}
}
for(new i; i < MAX_PLOVILA; i++)
{
if(PlovilaInfo == vehicleid)
{
if(PlovilaInfo == 1)
{
if(PlayerInfo >= 5)
{
new string;
format(string,sizeof(string), ""PPLAVA"Privatno Plovilo | "SIVA"Vlasnik: "PPLAVA"%s | "ZELENA"ID: %i", PlovilaInfo, i);
SCM(playerid,-1,string);
}
else if(PlayerInfo == i)
{
SCM(playerid,-1,"[IG:RPG] "ZELENA"Sedate u vase plovilo!");
}
else if(PlovilaInfo == 0)
{
SCM(playerid,-1,""PPLAVA"Privatno Plovilo");
}
else
{
SetPlayerPos(playerid, Poz, Poz, Poz);
SCM(playerid,-1,""PPLAVA"Plovilo Zakljucano");
}
}
return 1;
}
}
if(vehicleid >= vmotosalon && vehicleid <= vmotosalon)
{
SetPlayerPos(playerid, Poz, Poz, Poz);
SCM(playerid,-1,""PPLAVA"["BELA"IG:RPG"PPLAVA"] :Ne mozete uci u izlozbeno vozilo!");
}
if(vehicleid == IzlozbenoAuto)
{
SetPlayerPos(playerid, Poz, Poz, Poz);
SCM(playerid,-1,""PPLAVA"["BELA"IG:RPG"PPLAVA"] :Ne mozete uci u izlozbeno vozilo!");
}
/* if(AutoSalonVozila(vehicleid))
{
SetPlayerPos(playerid, Poz, Poz, Poz);
SCM(playerid,-1,""PPLAVA"["BELA"IG:RPG"PPLAVA"] :Ne mozete uci u izlozbeno vozilo!");
}
*/ if(BikeSalonVozila(vehicleid))
{
SetPlayerPos(playerid, Poz, Poz, Poz);
SCM(playerid,-1,""PPLAVA"["BELA"IG:RPG"PPLAVA"] :Ne mozete uci u izlozbeno vozilo!");
}
if(!ispassenger)
{
if(PolicijskaAuta(vehicleid))
{
if(PlayerInfo != 1)
{
SetPlayerPos(playerid, Poz, Poz, Poz);
GameTextForPlayer(playerid, "~b~Los Santos Police Department!", 2500, 5);
}
}
if(PoAuta(vehicleid))
{
if(PlayerInfo != 11)
{
SetPlayerPos(playerid, Poz, Poz, Poz);
GameTextForPlayer(playerid, "~r~Blue Lagoon", 2500, 5);
}
}
if(PoAuta3(vehicleid))
{
if(PlayerInfo != 19)
{
SetPlayerPos(playerid, Poz, Poz, Poz);
GameTextForPlayer(playerid, "~r~DR", 2500, 5);
}
}
if(Po2Auta(vehicleid))
{
if(PlayerInfo != 12)
{
SetPlayerPos(playerid, Poz, Poz, Poz);
GameTextForPlayer(playerid, "~r~Blue Terra", 2500, 5);
}
}
if(Po3Auta(vehicleid))
{
if(PlayerInfo != 13)
{
SetPlayerPos(playerid, Poz, Poz, Poz);
GameTextForPlayer(playerid, "~r~Da Naga Boys", 2500, 5);
}
}
if(SaAuta(vehicleid))
{
if(PlayerInfo != 10)
{
SetPlayerPos(playerid, Poz, Poz, Poz);
GameTextForPlayer(playerid, "~r~Hitman", 2500, 5);
}
}
if(TaxiAuta(vehicleid))
{
if(PlayerInfo != 14)
{
SetPlayerPos(playerid, Poz, Poz, Poz);
GameTextForPlayer(playerid, "~r~Taxi", 2500, 5);
}
}
if(BaseAuta(vehicleid))
{
if(PlayerInfo != 15)
{
SetPlayerPos(playerid, Poz, Poz, Poz);
GameTextForPlayer(playerid, "~r~Yakuza", 2500, 5);
}
}
if(FBIAuta(vehicleid))
{
if(PlayerInfo != 7)
{
SetPlayerPos(playerid, Poz, Poz, Poz);
GameTextForPlayer(playerid, "~r~FBI", 2500, 5);
}
}
if(Brod(vehicleid))
{
if(PlayerInfo < 0)
{
SetPlayerPos(playerid, Poz, Poz, Poz);
GameTextForPlayer(playerid, "~r~Samo Admin", 2500, 5);
}
}
if(FBIAuta(vehicleid))
{
if(PlayerInfo != 7)
{
SetPlayerPos(playerid, Poz, Poz, Poz);
GameTextForPlayer(playerid, "~b~FBI!", 2500, 5);
}
}
if(ParkingAuta(vehicleid))
{
if(PlayerInfo != 8)
{
SetPlayerPos(playerid, Poz, Poz, Poz);
GameTextForPlayer(playerid, "~b~Parking Servis!", 2500, 5);
}
}
if(CondorAuta(vehicleid))
{
if(PlayerInfo != 9)
{
SetPlayerPos(playerid, Poz, Poz, Poz);
GameTextForPlayer(playerid, "~r~Condor", 2500, 5);
}
}
else if(TVFAuta(vehicleid))
{
if(PlayerInfo != 2)
{
SetPlayerPos(playerid, Poz, Poz, Poz);
GameTextForPlayer(playerid, "~r~The Vinci Family!", 2500, 5);
}
}
else if(TBTVozila(vehicleid))
{
if(PlayerInfo != 3)
{
SetPlayerPos(playerid, Poz, Poz, Poz);
GameTextForPlayer(playerid, "~l~Black Dragon Triads!", 2500, 5);
}
}
else if(GroveVozila(vehicleid))
{
if(PlayerInfo != 4)
{
SetPlayerPos(playerid, Poz, Poz, Poz);
GameTextForPlayer(playerid, "~g~Grove Street Family!", 2500, 5);
}
}
else if(BallasVozila(vehicleid))
{
if(PlayerInfo != 5)
{
SetPlayerPos(playerid, Poz, Poz, Poz);
GameTextForPlayer(playerid, "~w~Ballas!", 2500, 5);
}
}
else if(NovinariVozila(vehicleid))
{
if(PlayerInfo != 6)
{
SetPlayerPos(playerid, Poz, Poz, Poz);
GameTextForPlayer(playerid, "~y~Los Santos Novinari!", 2500, 5);
}
}
if(Po4Auta(vehicleid))
{
if(PlayerInfo != 20)
{
SetPlayerPos(playerid, Poz, Poz, Poz);
GameTextForPlayer(playerid, "~r~Russian Mafia", 2500, 5);
}
}
}
return 1;
}