Advertisement
CaveDweller_

Untitled

Jun 16th, 2014
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.97 KB | None | 0 0
  1. //----------------------------------------------------------
  2. //
  3. // GRAND LARCENY 1.0
  4. // A freeroam gamemode for SA-MP 0.3
  5. //
  6. //----------------------------------------------------------
  7.  
  8. #include <a_samp>
  9. #include <core>
  10. #include <float>
  11. #include "../include/gl_common.inc"
  12. #include "../include/gl_spawns.inc"
  13. #include <YSI\y_master>
  14. #include <YSI\y_commands>
  15. #include <sscanf2>
  16. #include <streamer>
  17. #include <speedcap>
  18. #include <foreach>
  19.  
  20. #pragma tabsize 0
  21.  
  22. //----------------------------------------------------------
  23.  
  24. #define COLOR_WHITE 0xFFFFFFFF
  25. #define COLOR_NORMAL_PLAYER 0xFFBB7777
  26.  
  27. #define CITY_LOS_SANTOS 0
  28. #define CITY_SAN_FIERRO 1
  29. #define CITY_LAS_VENTURAS 2
  30.  
  31. new total_vehicles_from_files=0;
  32.  
  33. // Class selection globals
  34. new gPlayerCitySelection[MAX_PLAYERS];
  35. new gPlayerHasCitySelected[MAX_PLAYERS];
  36. new gPlayerLastCitySelectionTick[MAX_PLAYERS];
  37.  
  38. new Text:txtClassSelHelper;
  39. new Text:txtLosSantos;
  40. new Text:txtSanFierro;
  41. new Text:txtLasVenturas;
  42.  
  43. new thisanimid=0;
  44. new lastanimid=0;
  45.  
  46. //----------------------------------------------------------
  47.  
  48. main()
  49. {
  50. print("\n---------------------------------------");
  51. print("Running Grand Larceny - by the SA-MP team\n");
  52. print("---------------------------------------\n");
  53. }
  54.  
  55. //----------------------------------------------------------
  56.  
  57. public OnPlayerConnect(playerid)
  58. {
  59. GameTextForPlayer(playerid,"~w~Grand Larceny",3000,4);
  60. SendClientMessage(playerid,COLOR_WHITE,"Welcome to {88AA88}G{FFFFFF}rand {88AA88}L{FFFFFF}arceny");
  61.  
  62. // class selection init vars
  63. gPlayerCitySelection[playerid] = -1;
  64. gPlayerHasCitySelected[playerid] = 0;
  65. gPlayerLastCitySelectionTick[playerid] = GetTickCount();
  66.  
  67. //SetPlayerColor(playerid,COLOR_NORMAL_PLAYER);
  68.  
  69. //Kick(playerid);
  70.  
  71. /*
  72. Removes vending machines
  73. RemoveBuildingForPlayer(playerid, 1302, 0.0, 0.0, 0.0, 6000.0);
  74. RemoveBuildingForPlayer(playerid, 1209, 0.0, 0.0, 0.0, 6000.0);
  75. RemoveBuildingForPlayer(playerid, 955, 0.0, 0.0, 0.0, 6000.0);
  76. RemoveBuildingForPlayer(playerid, 1775, 0.0, 0.0, 0.0, 6000.0);
  77. RemoveBuildingForPlayer(playerid, 1776, 0.0, 0.0, 0.0, 6000.0);
  78. */
  79.  
  80. /*
  81. new ClientVersion[32];
  82. GetPlayerVersion(playerid, ClientVersion, 32);
  83. printf("Player %d reports client version: %s", playerid, ClientVersion);*/
  84.  
  85. return 1;
  86. }
  87.  
  88. new SpeedoTimer[MAX_VEHICLES];
  89. new Iterator:Vehicle<MAX_VEHICLES>;
  90.  
  91. public OnVehicleSpawn(vehicleid)
  92. {
  93. Iter_Add(Vehicle, vehicleid);
  94. SpeedoTimer[vehicleid] = -1;
  95. }
  96.  
  97. public OnVehicleDeath(vehicleid, killerid)
  98. {
  99. Iter_Remove(Vehicle, vehicleid);
  100. }
  101.  
  102. new const
  103. KEY_VEHICLE_FORWARD = 0b001000,
  104. KEY_VEHICLE_BACKWARD = 0b100000
  105. ;
  106.  
  107. new Float:SpeedModifier[MAX_VEHICLES][2];
  108.  
  109. YCMD:vehiclespeed(playerid, params[], help)
  110. {
  111. if (!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "You must be in a vehicle to use this!");
  112.  
  113. if (GetPlayerVehicleSeat(playerid) != 0) return SendClientMessage(playerid, -1, "You must be the driver to use this!");
  114.  
  115. new vehicleid = GetPlayerVehicleID(playerid);
  116.  
  117. new Float:threshold, Float:modifier;
  118.  
  119. if (sscanf(params, "ff", threshold, modifier)) return SendClientMessage(playerid, -1, "Usage: /vehiclespeed <threshold> <modifier>");
  120.  
  121. SpeedModifier[vehicleid][0] = (threshold * threshold);
  122.  
  123. SpeedModifier[vehicleid][1] = modifier;
  124.  
  125. SendClientMessage(playerid, -1, "Speed set!");
  126.  
  127. return 1;
  128. }
  129.  
  130. forward SpeedUp();
  131. public SpeedUp() {
  132. new
  133. keys,
  134. Float:vx,
  135. Float:vy,
  136. Float:vz
  137. ;
  138.  
  139. // Loop all players
  140. for (new playerid = 0; playerid < 50; playerid++) {
  141. if (!IsPlayerConnected(playerid))
  142. continue;
  143.  
  144. new vehicleid;
  145. // Store the value from GetPlayerVehicleID and continue if it's not 0
  146. if ((vehicleid = GetPlayerVehicleID(playerid))) {
  147. if (SpeedModifier[vehicleid][1] == 0) continue;
  148.  
  149. // Get the player keys (vx is used here because we don't need updown/leftright)
  150. GetPlayerKeys(playerid, keys, _:vx, _:vx);
  151.  
  152. // If KEY_VEHICLE_FORWARD is pressed, but not KEY_VEHICLE_BACKWARD or KEY_HANDBRAKE.
  153. if ((keys & (KEY_VEHICLE_FORWARD | KEY_VEHICLE_BACKWARD | KEY_HANDBRAKE)) == KEY_VEHICLE_FORWARD) {
  154. // Get the velocity
  155. GetVehicleVelocity(vehicleid, vx, vy, vz);
  156.  
  157. // Don't do anything if the vehicle is going slowly
  158. if (vx * vx + vy * vy < SpeedModifier[vehicleid][0])
  159. continue;
  160.  
  161. // Increase the X and Y velocity
  162. vx *= SpeedModifier[vehicleid][1];
  163. vy *= SpeedModifier[vehicleid][1];
  164.  
  165. SendClientMessage(playerid, -1, "yes");
  166.  
  167. // Increase the Z velocity to make up for lost gravity, if needed.
  168. if (vz > 0.04 || vz < -0.04)
  169. vz -= 0.020;
  170.  
  171. // Now set it
  172. SetVehicleVelocity(vehicleid, vx, vy, vz);
  173. }
  174. }
  175. }
  176. }
  177.  
  178. YCMD:v(playerid, params[], help)
  179. {
  180. new model;
  181. if (sscanf(params, "d", model)) return SendClientMessage(playerid, -1, "Usage: /v <model>");
  182.  
  183. new Float:x, Float:y, Float:z, Float:a;
  184. GetPlayerPos(playerid, x,y,z);
  185. GetPlayerFacingAngle(playerid, a);
  186. new vehicle = CreateVehicle(model, x, y, z, a, -1, -1, -1);
  187. PutPlayerInVehicle(playerid, vehicle, 0);
  188. return 1;
  189. }
  190.  
  191. new VehicleTimer[MAX_VEHICLES];
  192. new VehicleTarget[MAX_VEHICLES];
  193.  
  194. new Text:SpeedoTextdrawLabel[2];
  195. new Text:SpeedoTextdrawSpeed[2][MAX_VEHICLES];
  196.  
  197. YCMD:speedo(playerid, params[], help)
  198. {
  199. if (!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "You must be in a vehicle to use this!");
  200.  
  201. if (GetPlayerVehicleSeat(playerid) != 0) return SendClientMessage(playerid, -1, "You must be the driver to use this!");
  202.  
  203. new vehicleid = GetPlayerVehicleID(playerid);
  204.  
  205. if (SpeedoTimer[vehicleid] == -1)
  206. {
  207. SendClientMessage(playerid, -1, "Speedo on");
  208.  
  209. SpeedoTextdrawSpeed[0][vehicleid] = TextDrawCreate(550.000000, 339.000000, "999");
  210. SpeedoTextdrawSpeed[1][vehicleid] = TextDrawCreate(550.000000, 357.000000, "999");
  211.  
  212. for (new i = 0; i < 2; i++)
  213. {
  214. TextDrawAlignment(SpeedoTextdrawSpeed[i][vehicleid], 3);
  215. TextDrawBackgroundColor(SpeedoTextdrawSpeed[i][vehicleid], 255);
  216. TextDrawFont(SpeedoTextdrawSpeed[i][vehicleid], 3);
  217. TextDrawLetterSize(SpeedoTextdrawSpeed[i][vehicleid], 0.370000, 1.800000);
  218. TextDrawSetOutline(SpeedoTextdrawSpeed[i][vehicleid], 0);
  219. TextDrawSetProportional(SpeedoTextdrawSpeed[i][vehicleid], 1);
  220. TextDrawSetShadow(SpeedoTextdrawSpeed[i][vehicleid], 1);
  221. TextDrawColor(SpeedoTextdrawSpeed[i][vehicleid], -1);
  222. }
  223.  
  224. HandleSpeedo(vehicleid, playerid);
  225. SpeedoTimer[vehicleid] = SetTimerEx("HandleSpeedo", 500, true, "dd", vehicleid, playerid);
  226. }
  227. else
  228. {
  229. SendClientMessage(playerid, -1, "Speedo off");
  230. KillTimer(SpeedoTimer[vehicleid]);
  231. SpeedoTimer[vehicleid] = -1;
  232.  
  233. TextDrawDestroy(SpeedoTextdrawSpeed[0][vehicleid]);
  234. TextDrawDestroy(SpeedoTextdrawSpeed[1][vehicleid]);
  235.  
  236. TextDrawHideForPlayer(playerid, SpeedoTextdrawLabel[0]);
  237. TextDrawHideForPlayer(playerid, SpeedoTextdrawLabel[1]);
  238. }
  239. return 1;
  240. }
  241.  
  242. forward HandleSpeedo(vehicleid, playerid);
  243. public HandleSpeedo(vehicleid, playerid)
  244. {
  245. new Float:speed_x, Float:speed_y, Float:speed_z, Float:final_speed;
  246. GetVehicleVelocity(vehicleid, speed_x, speed_y, speed_z);
  247. final_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*136.666667;
  248.  
  249. new string[50];
  250. format(string, sizeof(string), "%d", floatround(final_speed, floatround_round));
  251.  
  252. TextDrawSetString(SpeedoTextdrawSpeed[0][vehicleid], string);
  253.  
  254. //format(string, sizeof(string), "%d", floatround(final_speed * 1.60934, floatround_round));
  255.  
  256. format(string, sizeof(string), "%.2f", (speed_x * speed_x + speed_y * speed_y));
  257.  
  258. TextDrawSetString(SpeedoTextdrawSpeed[1][vehicleid], string);
  259.  
  260. if (IsPlayerInVehicle(playerid, vehicleid))
  261. {
  262. for (new t = 0; t < 2; t++)
  263. {
  264. TextDrawShowForPlayer(playerid, SpeedoTextdrawLabel[t]);
  265. TextDrawShowForPlayer(playerid, SpeedoTextdrawSpeed[t][vehicleid]);
  266. }
  267. }
  268. else
  269. {
  270. for (new t = 0; t < 2; t++)
  271. {
  272. TextDrawHideForPlayer(playerid, SpeedoTextdrawLabel[t]);
  273. TextDrawHideForPlayer(playerid, SpeedoTextdrawSpeed[t][vehicleid]);
  274. }
  275. }
  276. }
  277.  
  278. YCMD:dashcam(playerid, params[], help)
  279. {
  280. if (!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "You must be in a vehicle to use this!");
  281.  
  282. if (GetPlayerVehicleSeat(playerid) != 0) return SendClientMessage(playerid, -1, "You must be the driver to use this!");
  283.  
  284. new vehicleid = GetPlayerVehicleID(playerid);
  285.  
  286. if (VehicleTimer[vehicleid] != -1) return SendClientMessage(playerid, -1, "Your dashcam is already on!");
  287.  
  288. VehicleTimer[vehicleid] = SetTimerEx("DashCam", 1000, true, "d", vehicleid);
  289.  
  290. SendClientMessage(playerid, -1, "Dashcam on");
  291.  
  292. return 1;
  293. }
  294.  
  295. YCMD:dashcamoff(playerid, params[], help)
  296. {
  297. new vehicleid = GetPlayerVehicleID(playerid);
  298.  
  299. KillTimer(VehicleTimer[vehicleid]);
  300. VehicleTimer[vehicleid] = -1;
  301.  
  302. SendClientMessage(playerid, -1, "Dashcam off");
  303.  
  304. return 1;
  305. }
  306.  
  307. stock Float:GetDistanceBetweenPoints(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2)
  308. {
  309. x1 -= x2, y1 -= y2, z1 -= z2;
  310. return floatsqroot((x1 * x1) + (y1 * y1) + (z1 * z1));
  311. }
  312.  
  313. forward DashCam(vehicleid);
  314. public DashCam(vehicleid)
  315. {
  316. new Float:x, Float:y, Float:z, Float:a;
  317. GetVehiclePos(vehicleid, x, y, z);
  318. GetVehicleZAngle(vehicleid, a);
  319.  
  320. new Float:points[8];
  321. points[0] = (x + (1.0 * floatsin(-(a - 90), degrees)));
  322. points[1] = (y + (1.0 * floatcos(-(a - 90), degrees)));
  323. points[2] = (x + (45.0 * floatsin(-(a - 30), degrees)));
  324. points[3] = (y + (45.0 * floatcos(-(a - 30), degrees)));
  325. points[4] = (x + (45.0 * floatsin(-(a + 30), degrees)));
  326. points[5] = (y + (45.0 * floatcos(-(a + 30), degrees)));
  327. points[6] = (x + (1.0 * floatsin(-(a + 90), degrees)));
  328. points[7] = (y + (1.0 * floatcos(-(a + 90), degrees)));
  329.  
  330. new VehicleSearchPolygon = CreateDynamicPolygon(points);
  331.  
  332. new Float:closestDistance = 9999999999;
  333.  
  334. VehicleTarget[vehicleid] = -1;
  335.  
  336. for(new v = 0; v < MAX_VEHICLES; v++)
  337. {
  338. if (v == vehicleid) continue;
  339.  
  340. new Float:_x, Float:_y, Float:_z;
  341. GetVehiclePos(v, _x, _y, _z);
  342.  
  343. if (GetDistanceBetweenPoints(x, y, z, _x, _y, _z) > closestDistance) continue;
  344.  
  345. if (GetDistanceBetweenPoints(0, 0, z, 0, 0, _z) > 10) continue;
  346.  
  347. if (IsVehicleBodyInDynamicArea(v, VehicleSearchPolygon))
  348. {
  349. closestDistance = GetDistanceBetweenPoints(x, y, z, _x, _y, _z);
  350. VehicleTarget[vehicleid] = v;
  351. }
  352. }
  353.  
  354. if (VehicleTarget[vehicleid] != -1)
  355. {
  356. new string[128];
  357. format(string, sizeof(string), "Current target vehicle (%d) is a %s", VehicleTarget[vehicleid], GetVehicleName(VehicleTarget[vehicleid]));
  358. SendClientMessageToAll(-1, string);
  359. }
  360. }
  361.  
  362. stock IsVehicleBodyInDynamicArea(vehicleid, areaid)
  363. {
  364. new Float:x, Float:y, Float:z, Float:angle, Float:sX, Float:sY, Float:sZ, result;
  365. GetVehiclePos(vehicleid, x, y, z);
  366. GetVehicleModelInfo(vehicleid, VEHICLE_MODEL_INFO_SIZE , sX, sY, sZ);
  367. GetVehicleZAngle(vehicleid, angle);
  368. x += ( (sX / 2.0) * floatsin( -angle, degrees ) );
  369. y += ( (sY / 2.0) * floatsin( -angle, degrees ) );
  370. if(IsPointInDynamicArea(areaid, x, y, z))
  371. {
  372. result = 1;
  373. }
  374. if(result == 0)
  375. {
  376. GetVehicleModelInfo(vehicleid, VEHICLE_MODEL_INFO_SIZE , sX, sY, sZ);
  377. x -= ( (sX / 2.0) * floatsin( -angle, degrees ) );
  378. y -= ( (sY / 2.0) * floatsin( -angle, degrees ) );
  379. if(IsPointInDynamicArea(areaid, x, y, z))
  380. {
  381. result = 1;
  382. }
  383. }
  384. //z += (sZ / 2.0); acrtually no need to mess with the Z
  385. return result;
  386. }
  387.  
  388. new VehicleNames[][] =
  389. {
  390. "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel",
  391. "Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana", "Infernus",
  392. "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam",
  393. "Esperanto", "Taxi", "Washington", "Bobcat", "Whoopee", "BF Injection",
  394. "Hunter", "Premier", "Enforcer", "Securicar", "Banshee", "Predator", "Bus",
  395. "Rhino", "Barracks", "Hotknife", "Trailer", "Previon", "Coach", "Cabbie",
  396. "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral",
  397. "Squalo", "Seasparrow", "Pizzaboy", "Tram", "Trailer", "Turismo", "Speeder",
  398. "Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair", "Berkley's RC Van",
  399. "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale",
  400. "Oceanic","Sanchez", "Sparrow", "Patriot", "Quad", "Coastguard", "Dinghy",
  401. "Hermes", "Sabre", "Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX",
  402. "Burrito", "Camper", "Marquis", "Baggage", "Dozer", "Maverick", "News Chopper",
  403. "Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax", "Hotring", "Sandking",
  404. "Blista Compact", "Police Maverick", "Boxville", "Benson", "Mesa", "RC Goblin",
  405. "Hotring Racer A", "Hotring Racer B", "Bloodring Banger", "Rancher", "Super GT",
  406. "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster", "Stunt",
  407. "Tanker", "Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra",
  408. "FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck", "Fortune",
  409. "Cadrona", "FBI Truck", "Willard", "Forklift", "Tractor", "Combine", "Feltzer",
  410. "Remington", "Slamvan", "Blade", "Freight", "Streak", "Vortex", "Vincent",
  411. "Bullet", "Clover", "Sadler", "Firetruck", "Hustler", "Intruder", "Primo",
  412. "Cargobob", "Tampa", "Sunrise", "Merit", "Utility", "Nevada", "Yosemite",
  413. "Windsor", "Monster", "Monster", "Uranus", "Jester", "Sultan", "Stratium",
  414. "Elegy", "Raindance", "RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito",
  415. "Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper",
  416. "Broadway", "Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400",
  417. "News Van", "Tug", "Trailer", "Emperor", "Wayfarer", "Euros", "Hotdog", "Club",
  418. "Freight Box", "Trailer", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car",
  419. "Police Car", "Police Car", "Police Ranger", "Picador", "S.W.A.T", "Alpha",
  420. "Phoenix", "Glendale", "Sadler", "Luggage", "Luggage", "Stairs", "Boxville",
  421. "Tiller", "Utility Trailer"
  422. };
  423.  
  424. stock GetVehicleName(vehicleid)
  425. {
  426. new String[128];
  427.  
  428. if (GetVehicleModel(vehicleid) < 400)
  429. {
  430. format(String, sizeof(String), "null");
  431. return String;
  432. }
  433. format(String,sizeof(String),"%s",VehicleNames[GetVehicleModel(vehicleid) - 400]);
  434. return String;
  435. }
  436.  
  437. //----------------------------------------------------------
  438.  
  439. public OnPlayerSpawn(playerid)
  440. {
  441. if(IsPlayerNPC(playerid)) return 1;
  442.  
  443. new randSpawn = 0;
  444.  
  445. SetPlayerInterior(playerid,0);
  446. TogglePlayerClock(playerid,0);
  447. ResetPlayerMoney(playerid);
  448. GivePlayerMoney(playerid, 30000);
  449.  
  450. if(CITY_LOS_SANTOS == gPlayerCitySelection[playerid]) {
  451. randSpawn = random(sizeof(gRandomSpawns_LosSantos));
  452. SetPlayerPos(playerid,
  453. gRandomSpawns_LosSantos[randSpawn][0],
  454. gRandomSpawns_LosSantos[randSpawn][1],
  455. gRandomSpawns_LosSantos[randSpawn][2]);
  456. SetPlayerFacingAngle(playerid,gRandomSpawns_LosSantos[randSpawn][3]);
  457. }
  458. else if(CITY_SAN_FIERRO == gPlayerCitySelection[playerid]) {
  459. randSpawn = random(sizeof(gRandomSpawns_SanFierro));
  460. SetPlayerPos(playerid,
  461. gRandomSpawns_SanFierro[randSpawn][0],
  462. gRandomSpawns_SanFierro[randSpawn][1],
  463. gRandomSpawns_SanFierro[randSpawn][2]);
  464. SetPlayerFacingAngle(playerid,gRandomSpawns_SanFierro[randSpawn][3]);
  465. }
  466. else if(CITY_LAS_VENTURAS == gPlayerCitySelection[playerid]) {
  467. randSpawn = random(sizeof(gRandomSpawns_LasVenturas));
  468. SetPlayerPos(playerid,
  469. gRandomSpawns_LasVenturas[randSpawn][0],
  470. gRandomSpawns_LasVenturas[randSpawn][1],
  471. gRandomSpawns_LasVenturas[randSpawn][2]);
  472. SetPlayerFacingAngle(playerid,gRandomSpawns_LasVenturas[randSpawn][3]);
  473. }
  474.  
  475. //SetPlayerColor(playerid,COLOR_NORMAL_PLAYER);
  476.  
  477. SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,200);
  478. SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL_SILENCED,200);
  479. SetPlayerSkillLevel(playerid,WEAPONSKILL_DESERT_EAGLE,200);
  480. SetPlayerSkillLevel(playerid,WEAPONSKILL_SHOTGUN,200);
  481. SetPlayerSkillLevel(playerid,WEAPONSKILL_SAWNOFF_SHOTGUN,200);
  482. SetPlayerSkillLevel(playerid,WEAPONSKILL_SPAS12_SHOTGUN,200);
  483. SetPlayerSkillLevel(playerid,WEAPONSKILL_MICRO_UZI,200);
  484. SetPlayerSkillLevel(playerid,WEAPONSKILL_MP5,200);
  485. SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47,200);
  486. SetPlayerSkillLevel(playerid,WEAPONSKILL_M4,200);
  487. SetPlayerSkillLevel(playerid,WEAPONSKILL_SNIPERRIFLE,200);
  488.  
  489. GivePlayerWeapon(playerid,WEAPON_COLT45,100);
  490. //GivePlayerWeapon(playerid,WEAPON_MP5,100);
  491. TogglePlayerClock(playerid, 0);
  492.  
  493. return 1;
  494. }
  495.  
  496. public OnPlayerDisconnect(playerid)
  497. {
  498.  
  499. }
  500.  
  501. //----------------------------------------------------------
  502.  
  503. public OnPlayerDeath(playerid, killerid, reason)
  504. {
  505. new playercash;
  506.  
  507. // if they ever return to class selection make them city
  508. // select again first
  509. gPlayerHasCitySelected[playerid] = 0;
  510.  
  511. if(killerid == INVALID_PLAYER_ID) {
  512. ResetPlayerMoney(playerid);
  513. } else {
  514. playercash = GetPlayerMoney(playerid);
  515. if(playercash > 0) {
  516. GivePlayerMoney(killerid, playercash);
  517. ResetPlayerMoney(playerid);
  518. }
  519. }
  520. return 1;
  521. }
  522.  
  523. //----------------------------------------------------------
  524.  
  525. ClassSel_SetupCharSelection(playerid)
  526. {
  527. if(gPlayerCitySelection[playerid] == CITY_LOS_SANTOS) {
  528. SetPlayerInterior(playerid,11);
  529. SetPlayerPos(playerid,508.7362,-87.4335,998.9609);
  530. SetPlayerFacingAngle(playerid,0.0);
  531. SetPlayerCameraPos(playerid,508.7362,-83.4335,998.9609);
  532. SetPlayerCameraLookAt(playerid,508.7362,-87.4335,998.9609);
  533. }
  534. else if(gPlayerCitySelection[playerid] == CITY_SAN_FIERRO) {
  535. SetPlayerInterior(playerid,3);
  536. SetPlayerPos(playerid,-2673.8381,1399.7424,918.3516);
  537. SetPlayerFacingAngle(playerid,181.0);
  538. SetPlayerCameraPos(playerid,-2673.2776,1394.3859,918.3516);
  539. SetPlayerCameraLookAt(playerid,-2673.8381,1399.7424,918.3516);
  540. }
  541. else if(gPlayerCitySelection[playerid] == CITY_LAS_VENTURAS) {
  542. SetPlayerInterior(playerid,3);
  543. SetPlayerPos(playerid,349.0453,193.2271,1014.1797);
  544. SetPlayerFacingAngle(playerid,286.25);
  545. SetPlayerCameraPos(playerid,352.9164,194.5702,1014.1875);
  546. SetPlayerCameraLookAt(playerid,349.0453,193.2271,1014.1797);
  547. }
  548.  
  549. }
  550.  
  551. //----------------------------------------------------------
  552. // Used to init textdraws of city names
  553.  
  554. ClassSel_InitCityNameText(Text:txtInit)
  555. {
  556. TextDrawUseBox(txtInit, 0);
  557. TextDrawLetterSize(txtInit,1.25,3.0);
  558. TextDrawFont(txtInit, 0);
  559. TextDrawSetShadow(txtInit,0);
  560. TextDrawSetOutline(txtInit,1);
  561. TextDrawColor(txtInit,0xEEEEEEFF);
  562. TextDrawBackgroundColor(txtClassSelHelper,0x000000FF);
  563. }
  564.  
  565. //----------------------------------------------------------
  566.  
  567. ClassSel_InitTextDraws()
  568. {
  569. // Init our observer helper text display
  570. txtLosSantos = TextDrawCreate(10.0, 380.0, "Los Santos");
  571. ClassSel_InitCityNameText(txtLosSantos);
  572. txtSanFierro = TextDrawCreate(10.0, 380.0, "San Fierro");
  573. ClassSel_InitCityNameText(txtSanFierro);
  574. txtLasVenturas = TextDrawCreate(10.0, 380.0, "Las Venturas");
  575. ClassSel_InitCityNameText(txtLasVenturas);
  576.  
  577. // Init our observer helper text display
  578. txtClassSelHelper = TextDrawCreate(10.0, 415.0,
  579. " Press ~b~~k~~GO_LEFT~ ~w~or ~b~~k~~GO_RIGHT~ ~w~to switch cities.~n~ Press ~r~~k~~PED_FIREWEAPON~ ~w~to select.");
  580. TextDrawUseBox(txtClassSelHelper, 1);
  581. TextDrawBoxColor(txtClassSelHelper,0x222222BB);
  582. TextDrawLetterSize(txtClassSelHelper,0.3,1.0);
  583. TextDrawTextSize(txtClassSelHelper,400.0,40.0);
  584. TextDrawFont(txtClassSelHelper, 2);
  585. TextDrawSetShadow(txtClassSelHelper,0);
  586. TextDrawSetOutline(txtClassSelHelper,1);
  587. TextDrawBackgroundColor(txtClassSelHelper,0x000000FF);
  588. TextDrawColor(txtClassSelHelper,0xFFFFFFFF);
  589. }
  590.  
  591. //----------------------------------------------------------
  592.  
  593. ClassSel_SetupSelectedCity(playerid)
  594. {
  595. if(gPlayerCitySelection[playerid] == -1) {
  596. gPlayerCitySelection[playerid] = CITY_LOS_SANTOS;
  597. }
  598.  
  599. if(gPlayerCitySelection[playerid] == CITY_LOS_SANTOS) {
  600. SetPlayerInterior(playerid,0);
  601. SetPlayerCameraPos(playerid,1630.6136,-2286.0298,110.0);
  602. SetPlayerCameraLookAt(playerid,1887.6034,-1682.1442,47.6167);
  603.  
  604. TextDrawShowForPlayer(playerid,txtLosSantos);
  605. TextDrawHideForPlayer(playerid,txtSanFierro);
  606. TextDrawHideForPlayer(playerid,txtLasVenturas);
  607. }
  608. else if(gPlayerCitySelection[playerid] == CITY_SAN_FIERRO) {
  609. SetPlayerInterior(playerid,0);
  610. SetPlayerCameraPos(playerid,-1300.8754,68.0546,129.4823);
  611. SetPlayerCameraLookAt(playerid,-1817.9412,769.3878,132.6589);
  612.  
  613. TextDrawHideForPlayer(playerid,txtLosSantos);
  614. TextDrawShowForPlayer(playerid,txtSanFierro);
  615. TextDrawHideForPlayer(playerid,txtLasVenturas);
  616. }
  617. else if(gPlayerCitySelection[playerid] == CITY_LAS_VENTURAS) {
  618. SetPlayerInterior(playerid,0);
  619. SetPlayerCameraPos(playerid,1310.6155,1675.9182,110.7390);
  620. SetPlayerCameraLookAt(playerid,2285.2944,1919.3756,68.2275);
  621.  
  622. TextDrawHideForPlayer(playerid,txtLosSantos);
  623. TextDrawHideForPlayer(playerid,txtSanFierro);
  624. TextDrawShowForPlayer(playerid,txtLasVenturas);
  625. }
  626. }
  627.  
  628. //----------------------------------------------------------
  629.  
  630. ClassSel_SwitchToNextCity(playerid)
  631. {
  632. gPlayerCitySelection[playerid]++;
  633. if(gPlayerCitySelection[playerid] > CITY_LAS_VENTURAS) {
  634. gPlayerCitySelection[playerid] = CITY_LOS_SANTOS;
  635. }
  636. PlayerPlaySound(playerid,1052,0.0,0.0,0.0);
  637. gPlayerLastCitySelectionTick[playerid] = GetTickCount();
  638. ClassSel_SetupSelectedCity(playerid);
  639. }
  640.  
  641. //----------------------------------------------------------
  642.  
  643. ClassSel_SwitchToPreviousCity(playerid)
  644. {
  645. gPlayerCitySelection[playerid]--;
  646. if(gPlayerCitySelection[playerid] < CITY_LOS_SANTOS) {
  647. gPlayerCitySelection[playerid] = CITY_LAS_VENTURAS;
  648. }
  649. PlayerPlaySound(playerid,1053,0.0,0.0,0.0);
  650. gPlayerLastCitySelectionTick[playerid] = GetTickCount();
  651. ClassSel_SetupSelectedCity(playerid);
  652. }
  653.  
  654. //----------------------------------------------------------
  655.  
  656. ClassSel_HandleCitySelection(playerid)
  657. {
  658. new Keys,ud,lr;
  659. GetPlayerKeys(playerid,Keys,ud,lr);
  660.  
  661. if(gPlayerCitySelection[playerid] == -1) {
  662. ClassSel_SwitchToNextCity(playerid);
  663. return;
  664. }
  665.  
  666. // only allow new selection every ~500 ms
  667. if( (GetTickCount() - gPlayerLastCitySelectionTick[playerid]) < 500 ) return;
  668.  
  669. if(Keys & KEY_FIRE) {
  670. gPlayerHasCitySelected[playerid] = 1;
  671. TextDrawHideForPlayer(playerid,txtClassSelHelper);
  672. TextDrawHideForPlayer(playerid,txtLosSantos);
  673. TextDrawHideForPlayer(playerid,txtSanFierro);
  674. TextDrawHideForPlayer(playerid,txtLasVenturas);
  675. TogglePlayerSpectating(playerid,0);
  676. return;
  677. }
  678.  
  679. if(lr > 0) {
  680. ClassSel_SwitchToNextCity(playerid);
  681. }
  682. else if(lr < 0) {
  683. ClassSel_SwitchToPreviousCity(playerid);
  684. }
  685. }
  686.  
  687. //----------------------------------------------------------
  688.  
  689. public OnPlayerRequestClass(playerid, classid)
  690. {
  691. if(IsPlayerNPC(playerid)) return 1;
  692.  
  693. if(gPlayerHasCitySelected[playerid]) {
  694. ClassSel_SetupCharSelection(playerid);
  695. return 1;
  696. } else {
  697. if(GetPlayerState(playerid) != PLAYER_STATE_SPECTATING) {
  698. TogglePlayerSpectating(playerid,1);
  699. TextDrawShowForPlayer(playerid, txtClassSelHelper);
  700. gPlayerCitySelection[playerid] = -1;
  701. }
  702. }
  703.  
  704. return 0;
  705. }
  706.  
  707. //----------------------------------------------------------
  708.  
  709. public OnGameModeInit()
  710. {
  711. SetGameModeText("Grand Larceny");
  712. ShowPlayerMarkers(PLAYER_MARKERS_MODE_GLOBAL);
  713. ShowNameTags(1);
  714. SetNameTagDrawDistance(40.0);
  715. EnableStuntBonusForAll(0);
  716. DisableInteriorEnterExits();
  717. SetWeather(2);
  718. SetWorldTime(11);
  719.  
  720. UsePlayerPedAnims();
  721. //ManualVehicleEngineAndLights();
  722. //LimitGlobalChatRadius(300.0);
  723.  
  724. ClassSel_InitTextDraws();
  725.  
  726. // Player Class
  727. AddPlayerClass(281,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  728. AddPlayerClass(282,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  729. AddPlayerClass(283,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  730. AddPlayerClass(284,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  731. AddPlayerClass(285,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  732. AddPlayerClass(286,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  733. AddPlayerClass(287,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  734. AddPlayerClass(288,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  735. AddPlayerClass(289,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  736. AddPlayerClass(265,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  737. AddPlayerClass(266,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  738. AddPlayerClass(267,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  739. AddPlayerClass(268,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  740. AddPlayerClass(269,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  741. AddPlayerClass(270,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  742. AddPlayerClass(1,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  743. AddPlayerClass(2,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  744. AddPlayerClass(3,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  745. AddPlayerClass(4,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  746. AddPlayerClass(5,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  747. AddPlayerClass(6,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  748. AddPlayerClass(8,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  749. AddPlayerClass(42,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  750. AddPlayerClass(65,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  751. //AddPlayerClass(74,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  752. AddPlayerClass(86,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  753. AddPlayerClass(119,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  754. AddPlayerClass(149,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  755. AddPlayerClass(208,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  756. AddPlayerClass(273,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  757. AddPlayerClass(289,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  758.  
  759. AddPlayerClass(47,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  760. AddPlayerClass(48,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  761. AddPlayerClass(49,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  762. AddPlayerClass(50,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  763. AddPlayerClass(51,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  764. AddPlayerClass(52,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  765. AddPlayerClass(53,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  766. AddPlayerClass(54,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  767. AddPlayerClass(55,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  768. AddPlayerClass(56,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  769. AddPlayerClass(57,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  770. AddPlayerClass(58,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  771. AddPlayerClass(68,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  772. AddPlayerClass(69,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  773. AddPlayerClass(70,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  774. AddPlayerClass(71,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  775. AddPlayerClass(72,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  776. AddPlayerClass(73,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  777. AddPlayerClass(75,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  778. AddPlayerClass(76,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  779. AddPlayerClass(78,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  780. AddPlayerClass(79,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  781. AddPlayerClass(80,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  782. AddPlayerClass(81,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  783. AddPlayerClass(82,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  784. AddPlayerClass(83,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  785. AddPlayerClass(84,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  786. AddPlayerClass(85,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  787. AddPlayerClass(87,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  788. AddPlayerClass(88,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  789. AddPlayerClass(89,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  790. AddPlayerClass(91,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  791. AddPlayerClass(92,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  792. AddPlayerClass(93,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  793. AddPlayerClass(95,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  794. AddPlayerClass(96,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  795. AddPlayerClass(97,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  796. AddPlayerClass(98,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  797. AddPlayerClass(99,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
  798.  
  799. // SPECIAL
  800. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/trains.txt");
  801. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/pilots.txt");
  802.  
  803. // LAS VENTURAS
  804. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_law.txt");
  805. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_airport.txt");
  806. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_gen.txt");
  807.  
  808. // SAN FIERRO
  809. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_law.txt");
  810. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_airport.txt");
  811. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_gen.txt");
  812.  
  813. // LOS SANTOS
  814. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_law.txt");
  815. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_airport.txt");
  816. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_gen_inner.txt");
  817. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_gen_outer.txt");
  818.  
  819. // OTHER AREAS
  820. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/whetstone.txt");
  821. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/bone.txt");
  822. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/flint.txt");
  823. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/tierra.txt");
  824. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/red_county.txt");
  825.  
  826. printf("Total vehicles from files: %d",total_vehicles_from_files);
  827.  
  828. for (new v = 0; v < MAX_VEHICLES; v++)
  829. {
  830. SpeedoTimer[v] = -1;
  831. }
  832.  
  833. SpeedoTextdrawLabel[0] = TextDrawCreate(580.000000, 339.000000, "MPH");
  834.  
  835. SpeedoTextdrawLabel[1] = TextDrawCreate(577.000000, 357.000000, "VEL");//"KPH");
  836.  
  837. for (new i = 0; i < 2; i++)
  838. {
  839. TextDrawAlignment(SpeedoTextdrawLabel[i], 3);
  840. TextDrawBackgroundColor(SpeedoTextdrawLabel[i], 255);
  841. TextDrawFont(SpeedoTextdrawLabel[i], 3);
  842. TextDrawLetterSize(SpeedoTextdrawLabel[i], 0.370000, 1.800000);
  843. TextDrawSetOutline(SpeedoTextdrawLabel[i], 0);
  844. TextDrawSetProportional(SpeedoTextdrawLabel[i], 1);
  845. TextDrawSetShadow(SpeedoTextdrawLabel[i], 1);
  846. TextDrawColor(SpeedoTextdrawLabel[i], -858993921);
  847. }
  848.  
  849. SetTimer("SpeedUp", 220, true);
  850.  
  851. return 1;
  852. }
  853.  
  854. //----------------------------------------------------------
  855.  
  856. public OnPlayerUpdate(playerid)
  857. {
  858. if(!IsPlayerConnected(playerid)) return 0;
  859. if(IsPlayerNPC(playerid)) return 1;
  860.  
  861. // changing cities by inputs
  862. if( !gPlayerHasCitySelected[playerid] &&
  863. GetPlayerState(playerid) == PLAYER_STATE_SPECTATING ) {
  864. ClassSel_HandleCitySelection(playerid);
  865. return 1;
  866. }
  867.  
  868. // No weapons in interiors
  869. if(GetPlayerInterior(playerid) != 0 && GetPlayerWeapon(playerid) != 0) {
  870. SetPlayerArmedWeapon(playerid,0); // fists
  871. return 0; // no syncing until they change their weapon
  872. }
  873.  
  874. // Don't allow minigun
  875. if(GetPlayerWeapon(playerid) == WEAPON_MINIGUN) {
  876. Kick(playerid);
  877. return 0;
  878. }
  879.  
  880. /* No jetpacks allowed
  881. if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) {
  882. Kick(playerid);
  883. return 0;
  884. }*/
  885.  
  886. /* For testing animations
  887. new msg[128+1];
  888. new animlib[32+1];
  889. new animname[32+1];
  890.  
  891. thisanimid = GetPlayerAnimationIndex(playerid);
  892. if(lastanimid != thisanimid)
  893. {
  894. GetAnimationName(thisanimid,animlib,32,animname,32);
  895. format(msg, 128, "anim(%d,%d): %s %s", lastanimid, thisanimid, animlib, animname);
  896. lastanimid = thisanimid;
  897. SendClientMessage(playerid, 0xFFFFFFFF, msg);
  898. }*/
  899.  
  900. return 1;
  901. }
  902.  
  903. //----------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement