Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- if(!ispassenger)
- {
- new Float:Poz[3];
- foreach(Player, i)
- {
- if(GetPlayerVehicleID(i) == vehicleid && GetPlayerState(i) == PLAYER_STATE_DRIVER)
- {
- GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SetPlayerPos(playerid, Poz[0], Poz[1]+2, Poz[2]+0.5);
- SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Ne mozete ukrasti vozilo dok je drugi igrac u njemu.");
- return 1;
- }
- }
- for(new i; i < MAX_VEHICLES; i++)
- {
- if(VInfo[i][ownedvehicle] == vehicleid)
- {
- if(i == IgracevAuto1[playerid] || VInfo[i][Locked] == 0)
- {
- return 1;
- }
- else
- {
- new Float:Poz[3];
- GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SetPlayerPos(playerid, Poz[0], Poz[1]+2, Poz[2]+0.5);
- SCMF(playerid, GRAD2, "*Vehicle is locked, owner of this vehicle is %s", VInfo[i][Vlasnik]);
- return 1;
- }
- }
- }
- // Organizacije
- if(VoziloPolicije(vehicleid) && PI[playerid][Clan] != 1)
- {
- GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
- }
- else if(VoziloFBI(vehicleid) && PI[playerid][Clan] != 2)
- {
- GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
- }
- else if(VoziloHP(vehicleid) && PI[playerid][Clan] != 3)
- {
- GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
- }
- else if(VoziloCNN(vehicleid) && PI[playerid][Clan] != 4)
- {
- GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
- }
- else if(VoziloGSF(vehicleid) && PI[playerid][Clan] != 5)
- {
- GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
- }
- else if(VoziloBAL(vehicleid) && PI[playerid][Clan] != 6)
- {
- GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
- }
- else if(VoziloHA(vehicleid) && PI[playerid][Clan] != 7)
- {
- GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
- }
- else if(VoziloSUR(vehicleid) && PI[playerid][Clan] != 8)
- {
- GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
- }
- else if(VoziloLFS(vehicleid) && PI[playerid][Clan] != 9)
- {
- GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
- }
- else if(VoziloYMG(vehicleid) && PI[playerid][Clan] != 10)
- {
- GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
- }
- else if(VoziloPINK(vehicleid) && PI[playerid][Clan] != 11)
- {
- GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
- }
- else if(VoziloRM(vehicleid) && PI[playerid][Clan] != 12)
- {
- GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
- }
- else if(VoziloHIT(vehicleid) && PI[playerid][Clan] != 13)
- {
- GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
- }
- else if(VoziloTVF(vehicleid) && PI[playerid][Clan] != 14)
- {
- GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
- }
- else if(VoziloTaksi(vehicleid) && PI[playerid][Clan] != 15)
- {
- GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
- }
- // SALONI
- if(VoziloAutosalon(vehicleid))
- {
- GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Ne mozete uci u izlozbeno vozilo.");
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement