Guest User

Garaze

a guest
Jul 31st, 2016
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.99 KB | None | 0 0
  1. YCMD:exit(playerid, params[],help)
  2. {
  3. #pragma unused help
  4. #pragma unused params
  5. for(new g; g < MAX_GARAZA; g++)
  6. {
  7. new gid = UsaoGaraza[playerid];
  8. if(IsPlayerInRangeOfPoint(playerid, 7.0, GarazaInfo[gid][gIzlazX], GarazaInfo[gid][gIzlazY], GarazaInfo[gid][gIzlazZ]))
  9. {
  10. if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
  11. {
  12. SetPlayerVirtualWorld(playerid, 0);
  13. SetPlayerInterior(playerid, 0);
  14. UsaoGaraza[playerid] = 0;
  15. SetPlayerPos(playerid, GarazaInfo[gid][gUlazX], GarazaInfo[gid][gUlazY], GarazaInfo[gid][gUlazZ]);
  16. }
  17. else if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  18. {
  19. for(new i = 0; i < MAX_PLAYERS; i++)
  20. {
  21. new vid = GetPlayerVehicleID(playerid);
  22. if(IsPlayerInVehicle(i, vid))
  23. {
  24. SetVehiclePos(vid,GarazaInfo[gid][gUlazX], GarazaInfo[gid][gUlazY], GarazaInfo[gid][gUlazZ]);
  25. SetVehicleVirtualWorld(vid,0);
  26. LinkVehicleToInterior(vid, 0);
  27. ////////////////////////////////////////////////////
  28. SetPlayerVirtualWorld(playerid, 0);
  29. SetPlayerInterior(playerid, 0);
  30. SetPlayerPos(playerid, GarazaInfo[gid][gUlazX], GarazaInfo[gid][gUlazY], GarazaInfo[gid][gUlazZ]);
  31. PutPlayerInVehicle(playerid,vid,0);
  32. UsaoGaraza[i] = 0;
  33. }
  34. }
  35. }
  36. }
  37. }
  38. return 1;
  39. }
  40. YCMD:enter(playerid, params[],help)
  41. {
  42. #pragma unused help
  43. #pragma unused params
  44. for(new g; g < MAX_GARAZA; g++)
  45. {
  46. if(IsPlayerInRangeOfPoint(playerid, 7.0, GarazaInfo[g][gUlazX], GarazaInfo[g][gUlazY], GarazaInfo[g][gUlazZ]))
  47. {
  48. if(PI[playerid][pGaraza] == g || GarazaInfo[g][gZatvoreno] == 0)
  49. {
  50. if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
  51. {
  52. SetPlayerVirtualWorld(playerid, GarazaInfo[g][gVW]);
  53. SetPlayerInterior(playerid, GarazaInfo[g][gInt]);
  54. SetPlayerPos(playerid, GarazaInfo[g][gIzlazX], GarazaInfo[g][gIzlazY], GarazaInfo[g][gIzlazZ]);
  55. }
  56. else if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  57. {
  58. for(new i = 0; i < MAX_PLAYERS; i++)
  59. {
  60. new vid = GetPlayerVehicleID(playerid);
  61. if(IsPlayerInVehicle(i, vid))
  62. {
  63. SetVehiclePos(vid,GarazaInfo[g][gIzlazX], GarazaInfo[g][gIzlazY], GarazaInfo[g][gIzlazZ]);
  64. SetVehicleVirtualWorld(vid,GarazaInfo[g][gVW]);
  65. LinkVehicleToInterior(vid, GarazaInfo[g][gInt]);
  66. ////////////////////////////////////////////////////
  67. SetPlayerVirtualWorld(playerid, GarazaInfo[g][gVW]);
  68. SetPlayerInterior(playerid, GarazaInfo[g][gInt]);
  69. SetPlayerPos(playerid, GarazaInfo[g][gIzlazX], GarazaInfo[g][gIzlazY], GarazaInfo[g][gIzlazZ]);
  70. PutPlayerInVehicle(playerid,vid,0);
  71. }
  72. }
  73. }
  74. UsaoGaraza[playerid] = g;
  75. }
  76. else return GameTextForPlayer(playerid,"~w~Garaza ~r~zakljucana",5000,3);
  77. }
  78. }
  79. return 1;
  80. }
Advertisement
Add Comment
Please, Sign In to add comment