Advertisement
Guest User

Untitled

a guest
Oct 19th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.70 KB | None | 0 0
  1. stock GarazaID(playerid)
  2. {
  3.     for(new i = 0; i < 9999; 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.                 print("1");
  16.                 new vehicleid = GetPlayerVehicleID(playerid), kojagaraza = GarazaID(playerid);
  17.                 if(HouseInfo[kojagaraza][hGarazaZakljucana] == 1 && Igrac[playerid][pKuca] != kojagaraza) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Garaza zakljucana.");
  18.                 print("3");
  19.                 if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  20.                 {
  21.                     SetVehicleVirtualWorld(vehicleid, kojagaraza);
  22.                     for(new i = 0; i < MAX_PLAYERS; i++)
  23.                     {
  24.                         if(IsPlayerInVehicle(i, vehicleid) && i != playerid && IsValidVehicle(vehicleid))
  25.                         {
  26.                             SetPlayerVirtualWorld(i, kojagaraza);
  27.                             hGarazaEntered[i] = kojagaraza;
  28.                         }
  29.                     }
  30.                     Portan[playerid] = 4;
  31.                     SetPlayerVirtualWorld(playerid, kojagaraza);
  32.                     SetVehiclePos(vehicleid, 1373.6763,-38.0756,1001.0511);
  33.                     SetVehicleZAngle(vehicleid, 1.7881);
  34.                     hGarazaEntered[playerid] = kojagaraza;
  35.                 }
  36.                 else if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
  37.                 {
  38.                     SetPlayerVirtualWorld(playerid, kojagaraza);
  39.                     AC_SetPlayerPos(playerid, 1373.6763,-38.0756,1001.0511);
  40.                     hGarazaEntered[playerid] = kojagaraza;
  41.                 }
  42.                 print("2");
  43.                 return 1;
  44.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement