Advertisement
Guest User

Untitled

a guest
Jul 6th, 2015
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 5.27 KB | None | 0 0
  1. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  2. {
  3.     if(!ispassenger)
  4.     {
  5.         new Float:Poz[3];
  6.         foreach(Player, i)
  7.         {
  8.             if(GetPlayerVehicleID(i) == vehicleid && GetPlayerState(i) == PLAYER_STATE_DRIVER)
  9.             {
  10.                 GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  11.                 SetPlayerPos(playerid, Poz[0], Poz[1]+2, Poz[2]+0.5);
  12.                 SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Ne mozete ukrasti vozilo dok je drugi igrac u njemu.");
  13.                 return 1;
  14.             }
  15.         }
  16.        
  17.         for(new i; i < MAX_VEHICLES; i++)
  18.         {
  19.             if(VInfo[i][ownedvehicle] == vehicleid)
  20.             {
  21.                 if(i == IgracevAuto1[playerid] || VInfo[i][Locked] == 0)
  22.                 {
  23.                     return 1;
  24.                 }
  25.                 else
  26.                 {
  27.                     new Float:Poz[3];
  28.                     GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  29.                     SetPlayerPos(playerid, Poz[0], Poz[1]+2, Poz[2]+0.5);
  30.                     SCMF(playerid, GRAD2, "*Vehicle is locked, owner of this vehicle is %s", VInfo[i][Vlasnik]);
  31.                     return 1;
  32.                 }
  33.             }
  34.         }
  35.        
  36.         // Organizacije
  37.         if(VoziloPolicije(vehicleid) && PI[playerid][Clan] != 1)
  38.         {
  39.             GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  40.             SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  41.             SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
  42.         }
  43.         else if(VoziloFBI(vehicleid) && PI[playerid][Clan] != 2)
  44.         {
  45.             GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  46.             SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  47.             SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
  48.         }
  49.         else if(VoziloHP(vehicleid) && PI[playerid][Clan] != 3)
  50.         {
  51.             GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  52.             SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  53.             SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
  54.         }
  55.         else if(VoziloCNN(vehicleid) && PI[playerid][Clan] != 4)
  56.         {
  57.             GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  58.             SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  59.             SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
  60.         }
  61.         else if(VoziloGSF(vehicleid) && PI[playerid][Clan] != 5)
  62.         {
  63.             GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  64.             SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  65.             SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
  66.         }
  67.         else if(VoziloBAL(vehicleid) && PI[playerid][Clan] != 6)
  68.         {
  69.             GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  70.             SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  71.             SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
  72.         }
  73.         else if(VoziloHA(vehicleid) && PI[playerid][Clan] != 7)
  74.         {
  75.             GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  76.             SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  77.             SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
  78.         }
  79.         else if(VoziloSUR(vehicleid) && PI[playerid][Clan] != 8)
  80.         {
  81.             GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  82.             SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  83.             SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
  84.         }
  85.         else if(VoziloLFS(vehicleid) && PI[playerid][Clan] != 9)
  86.         {
  87.             GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  88.             SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  89.             SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
  90.         }
  91.         else if(VoziloYMG(vehicleid) && PI[playerid][Clan] != 10)
  92.         {
  93.             GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  94.             SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  95.             SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
  96.         }
  97.         else if(VoziloPINK(vehicleid) && PI[playerid][Clan] != 11)
  98.         {
  99.             GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  100.             SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  101.             SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
  102.         }
  103.         else if(VoziloRM(vehicleid) && PI[playerid][Clan] != 12)
  104.         {
  105.             GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  106.             SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  107.             SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
  108.         }
  109.         else if(VoziloHIT(vehicleid) && PI[playerid][Clan] != 13)
  110.         {
  111.             GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  112.             SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  113.             SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
  114.         }
  115.         else if(VoziloTVF(vehicleid) && PI[playerid][Clan] != 14)
  116.         {
  117.             GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  118.             SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  119.             SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
  120.         }
  121.         else if(VoziloTaksi(vehicleid) && PI[playerid][Clan] != 15)
  122.         {
  123.             GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  124.             SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  125.             SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Nemate kljuceve od ovog vozila.");
  126.         }
  127.  
  128.         // SALONI
  129.         if(VoziloAutosalon(vehicleid))
  130.         {
  131.             GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  132.             SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  133.             SCM(playerid, TOMATO, "[RPF] "COL_WHITE"Ne mozete uci u izlozbeno vozilo.");
  134.         }
  135.     }
  136.     return 1;
  137. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement