Advertisement
Guest User

Untitled

a guest
Oct 19th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.65 KB | None | 0 0
  1. stock GarazaID(playerid)
  2. {
  3.     for(new i = 0; i < sizeof(HouseInfo); i++) {
  4.         if(HouseInfo[i][hImagarazu] != 0 && HouseInfo[i][hEntrancex] != 0) {
  5.             if(IsPlayerInRangeOfPoint(playerid, 7.0, HouseInfo[i][hGarazaX], HouseInfo[i][hGarazaY], HouseInfo[i][hGarazaZ])) {
  6.                 return i;
  7.             }
  8.         }
  9.     }
  10.     return -1;
  11. }
  12.  
  13. if(GarazaID(playerid) != -1)
  14.             {
  15.                 new vehicleid = GetPlayerVehicleID(playerid), kojagaraza = GarazaID(playerid);
  16.                 if(HouseInfo[kojagaraza][hGarazaZakljucana] == 1 && Igrac[playerid][pKuca] != kojagaraza) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Garaza zakljucana.");
  17.                 if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  18.                 {
  19.                     SetVehicleVirtualWorld(vehicleid, kojagaraza);
  20.                     for(new i = 0; i < MAX_PLAYERS; i++)
  21.                     {
  22.                         if(IsPlayerInVehicle(i, vehicleid) && i != playerid && IsValidVehicle(vehicleid))
  23.                         {
  24.                             SetPlayerVirtualWorld(i, kojagaraza);
  25.                             hGarazaEntered[i] = kojagaraza;
  26.                         }
  27.                     }
  28.                     Portan[playerid] = 4;
  29.                     SetPlayerVirtualWorld(playerid, kojagaraza);
  30.                     SetVehiclePos(vehicleid, 1373.6763,-38.0756,1001.0511);
  31.                     SetVehicleZAngle(vehicleid, 1.7881);
  32.                     hGarazaEntered[playerid] = kojagaraza;
  33.                 }
  34.                 else if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
  35.                 {
  36.                     SetPlayerVirtualWorld(playerid, kojagaraza);
  37.                     AC_SetPlayerPos(playerid, 1373.6763,-38.0756,1001.0511);
  38.                     hGarazaEntered[playerid] = kojagaraza;
  39.                 }
  40.                 return 1;
  41.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement