Advertisement
Guest User

Untitled

a guest
Jan 20th, 2019
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1.  
  2. if(newkeys & KEY_SECONDARY_ATTACK) {
  3. if(GetPVarInt(playerid, "inGarage") != 0 && GetPlayerVirtualWorld(playerid) != 0 && IsPlayerInRangeOfPoint(playerid, 100.0, 487.9106,-431.6140,2757.9956)) {
  4. new id = GetPVarInt(playerid, "inGarage"), vehid;
  5. if(garage_slot(playerid, GetPVarInt(playerid, "garageSlot")) != -1) vehid = CarInfo[PlayerInfo[playerid][pCarKey][garage_slot(playerid, GetPVarInt(playerid, "garageSlot"))]][Spawned];
  6. if(garage_slot(playerid, GetPVarInt(playerid, "garageSlot")) == -1) return SendClientMessage(playerid, COLOR_WARNING, "Nu ai adaugat un vehicul pe acest slot din garaj!");
  7. else if(GetVehicleVirtualWorld(vehid) == 0) return SendClientMessage(playerid, COLOR_WARNING, "Vehiculul a fost scos din garaj deja!");
  8. else if(vehid == 0 && vehicle_in_garage(playerid, vehid)) return SendClientMessage(playerid, COLOR_WARNING, "Vehiculul nu este spawnat!");
  9. hide_garage_tds(playerid);
  10.  
  11. SetVehiclePos(vehid, garageInfo[id][gPos][0], garageInfo[id][gPos][1], garageInfo[id][gPos][2]);
  12. PutPlayerInVehicle(playerid, vehid, 0);
  13. SetVehicleZAngleEx(GetPlayerVehicleID(playerid), garageInfo[id][gAngle]);
  14. SetPlayerVirtualWorld(playerid, 0);
  15. SetVehicleVirtualWorld(vehid, 0);
  16. SetPVarInt(playerid, "inGarage", 0);
  17.  
  18. if(BarTimer[playerid]) KillTimer(BarTimer[playerid]);
  19. BarTimer[playerid] = SetTimerEx("BlackBar", 100, true, "%d", playerid);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement