Advertisement
Guest User

Untitled

a guest
Jul 19th, 2012
5,886
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.36 KB | None | 0 0
  1. #include <YSI\y_hooks>
  2.  
  3. Hook:paynspray_OnPlayerUpdate(playerid)
  4. {
  5.     if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  6.     {
  7.         new Float:vHealth;
  8.         GetVehicleHealth(GetPlayerVehicleID(playerid), vHealth);
  9.         if(vHealth == 1000)
  10.         {
  11.             SetVehicleHealth(GetPlayerVehicleID(playerid), 999);
  12.            
  13.             new const Float:paynspray[][] = {
  14.             {1025.05, -1024.23, 32.1}, // LS Temple
  15.             {487.68, -1740.87, 11.13}, // LS Santa Maria
  16.             {-1420.73, 2583.37, 55.56}, // El Quebrados
  17.             {-1904.39, 284.97, 40.75}, // Wang Cars
  18.             {-2425.91, 1022.33, 50.10}, // Juniper Hill
  19.             {1975.60, 2162.16, 10.77}, // LV Redsands
  20.             {2065.38, -1831.51, 13.25}, // Idlewood
  21.             {-99.55, 1118.36, 19.44}, // Fort Carson
  22.             {721.07, -455.94, 16.04}, // Dillimore
  23.             {2393.74, 1493.01, 10.52} // LV Unused (Pyramid)
  24.             };
  25.             for(new i=0; i<sizeof(paynspray); i++)
  26.             {
  27.                 if(IsPlayerInRangeOfPoint(playerid, 10, paynspray[i][0], paynspray[i][1], paynspray[i][2]))
  28.                 {
  29.                     CallRemoteFunction("OnVehicleRespray", "iiii", playerid, GetPlayerVehicleID(playerid), -1, -1);
  30.                     return 1;
  31.                 }
  32.             }
  33.         }
  34.     }
  35.     return 1;
  36. }
  37.  
  38. stock paynspray_CreateVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay)
  39. {
  40.     new vid = CreateVehicle(vehicletype, x, y, z, rotation, color1, color2, respawn_delay);
  41.     SetVehicleHealth(vid, 999);
  42.     return vid;
  43. }
  44.  
  45. #if defined _ALS_CreateVehicle
  46.     #undef CreateVehicle
  47. #else
  48.     #define _ALS_CreateVehicle
  49. #endif
  50. #define CreateVehicle paynspray_CreateVehicle
  51.  
  52. stock paynspray_AddStaticVehicleEx(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay)
  53. {
  54.     new vid = AddStaticVehicleEx(vehicletype, x, y, z, rotation, color1, color2, respawn_delay);
  55.     SetVehicleHealth(vid, 999);
  56.     return vid;
  57. }
  58.  
  59. #if defined _ALS_AddStaticVehicleEx
  60.     #undef AddStaticVehicleEx
  61. #else
  62.     #define _ALS_AddStaticVehicleEx
  63. #endif
  64. #define AddStaticVehicleEx paynspray_AddStaticVehicleEx
  65.  
  66. stock paynspray_AddStaticVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2)
  67. {
  68.     new vid = AddStaticVehicle(vehicletype, x, y, z, rotation, color1, color2);
  69.     SetVehicleHealth(vid, 999);
  70.     return vid;
  71. }
  72.  
  73. #if defined _ALS_AddStaticVehicle
  74.     #undef AddStaticVehicle
  75. #else
  76.     #define _ALS_AddStaticVehicle
  77. #endif
  78. #define AddStaticVehicle paynspray_AddStaticVehicle
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement