GammixSAMP

peds.inc R1 - By Gammix

Apr 30th, 2015
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.07 KB | None | 0 0
  1. /*
  2. PEDs Include (peds.inc)
  3. * Since samp 0.3.7 have actors system(which is coolest upgrade ever!), i have planned on peds(tpe of npcs) creator using pawn (not C++)
  4. * This include let you make AI and cool effects and peds without writing thier AI.
  5. * Well, this can be useful for making shopkeepers, body guards, dead bodies and lot more...
  6.  
  7. Author: (creator)
  8. * Gammix
  9.  
  10. Contributors:
  11. * Pottus - ideas and improvement
  12. * a_angles - took help for making the ped face points
  13.  
  14. (c) Copyright 2015
  15. * This file is provided as is (no warranties).
  16. */
  17. /*
  18. FUNCTIONS:
  19. native PED_Connect(skin, Float:x, Float:y, Float:z, Float:rotation = 0.0, Float:health = 100.0, bool:invulnerable = false);
  20. native PED_IsConnected(pedid);
  21. native PED_Disconnect(pedid);
  22. native PED_SetPos(pedid, Float:x, Float:y, Float:z);
  23. native PED_GetPos(pedid, &Float:x, &Float:y, &Float:z);
  24. native PED_SetFacingAngle(pedid, Float:angle);
  25. native PED_GetFacingAngle(pedid, &Float:angle);
  26. native PED_SetVirtualWorld(pedid, world);
  27. native PED_GetVirtualWorld(pedid);
  28. native PED_ToggleInvulnerable(pedid, bool:toggle);
  29. native PED_IsInvulnerable(pedid);
  30. native PED_SetFacingPoint(pedid, Float:x, Float:y);
  31. native PED_IsFacingPoint(pedid, Float:x, Float:y, Float:range = 10.0);
  32. native PED_SetFacingPlayer(pedid, playerid);
  33. native PED_IsFacingPlayer(pedid, playerid, Float:range = 10.0);
  34. native PED_IsBehindPlayer(pedid, playerid, Float:range = 10.0);
  35. native PED_IsInRangeOfPoint(pedid, Float:range, Float:x, Float:y, Float:z);
  36. native PED_SetHealth(pedid, Float:health);
  37. native PED_GetHealth(pedid, &Float:health);
  38. native PED_IsDead(pedid);
  39. native PED_ApplyAnimation(pedid, animlib[], animname[], Float:fDelta = 4.1, loop = 0, lockx = 1, locky = 1, freeze = 1, time = 0);
  40. native PED_Stop(pedid);
  41. native PED_Spawn(pedid);
  42. native PED_SetSpawnInfo(pedid, Float:x, Float:y, Float:z, Float:rotation, Float:health);
  43. native PED_IsStreamedIn(pedid, forplayerid);
  44. native PED_PlaySound(pedid, soundid);
  45. native _
  46. native GetPlayerCameraTargetPED(playerid);
  47. native GetPlayerTargetPED(playerid);
  48.  
  49. CALLBACKS:
  50. public PED_OnConnect(pedid)
  51. public PED_OnDisconnect(pedid)
  52. public PED_OnSpawn(pedid)
  53. public PED_OnTakeDamage(pedid, issuerid, weaponid, Float:amount, bodypart)
  54. public PED_OnDeath(pedid, killerid, weaponid)
  55. public PED_OnStreamIn(pedid, forplayerid)
  56. public PED_OnStreamOut(pedid, forplayerid)
  57. public PED_OnUpdate(pedid)
  58.  
  59. public OnPlayerTargetPED(playerid, pedid, weaponid)
  60. public OnPlayerGivePEDDamage(playerid, pedid, weaponid, Float:amount, bodypart)
  61. */
  62.  
  63. #if ! defined foreach_player
  64. #define foreach_player(%1) for(new %1; %1 <= GetPlayerPoolSize(); %1++) if(IsPlayerConnected(%1))
  65. #endif
  66.  
  67. //just kiding !:D!
  68. #define INVALID_PED_ID INVALID_ACTOR_ID
  69. #define MAX_PEDS MAX_ACTORS
  70.  
  71. enum PedEnum
  72. {
  73. P_SKIN,
  74. Float:P_X,
  75. Float:P_Y,
  76. Float:P_Z,
  77. Float:P_ROT,
  78. Float:P_HEALTH,
  79. P_DEATHTIMER
  80. }
  81. static gPED[MAX_PEDS][PedEnum];
  82.  
  83. //player targeting a ped!
  84. static gPlayerTarget[MAX_PLAYERS];
  85.  
  86. public OnPlayerConnect(playerid)
  87. {
  88. gPlayerTarget[playerid] = INVALID_PED_ID;
  89.  
  90. #if defined HoOK_OnPlayerConnect
  91. HoOK_OnPlayerConnect(playerid);
  92. #endif
  93. return 1;
  94. }
  95. #if defined _ALS_OnPlayerConnect
  96. #undef OnPlayerConnect
  97. #else
  98. #define _ALS_OnPlayerConnect
  99. #endif
  100. #define OnPlayerConnect HoOK_OnPlayerConnect
  101. #if defined HoOK_OnPlayerConnect
  102. forward HoOK_OnPlayerConnect(playerid);
  103. #endif
  104.  
  105. //internal functions
  106. stock static Float:PED_GetDistance(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2)
  107. {
  108. return floatsqroot( (( x1 - x2 ) * ( x1 - x2 )) + (( y1 - y2 ) * ( y1 - y2 )) + (( z1 - z2 ) * ( z1 - z2 )) );
  109. }
  110.  
  111. stock static PED_AngleInRangeOfAngle(Float:a1, Float:a2, Float:range = 10.0)
  112. {
  113. a1 -= a2;
  114. if((a1 < range) && (a1 > -range)) return true;
  115. return false;
  116. }
  117.  
  118. //include funcions
  119. stock PED_Connect(skin, Float:x, Float:y, Float:z, Float:rotation = 0.0, Float:health = 100.0, bool:invulnerable = false)
  120. {
  121. if(skin < 0 || skin > 311) return INVALID_PED_ID;
  122.  
  123. new _actor = CreateActor(skin, x, y, z, rotation);
  124. if(_actor == INVALID_PED_ID) return INVALID_PED_ID;
  125.  
  126. gPED[_actor][P_SKIN] = skin;
  127. gPED[_actor][P_X] = x;
  128. gPED[_actor][P_Y] = y;
  129. gPED[_actor][P_Z] = z;
  130. gPED[_actor][P_ROT] = rotation;
  131. gPED[_actor][P_HEALTH] = health;
  132. SetActorHealth(_actor, health);
  133. gPED[_actor][P_DEATHTIMER] = -1;
  134. SetActorInvulnerable(_actor, invulnerable);
  135.  
  136. CallLocalFunction("PED_OnConnect", "i", _actor);
  137. CallLocalFunction("PED_OnSpawn", "i", _actor);
  138. return _actor;
  139. }
  140.  
  141. #define PED_IsConnected IsValidActor//validity checker
  142.  
  143. stock PED_Disconnect(pedid)
  144. {
  145. if(! PED_IsConnected(pedid)) return false;
  146.  
  147. if(gPED[target_ped][P_DEATHTIMER] != -1) KillTimer(gPED[target_ped][P_DEATHTIMER]);
  148. gPED[target_ped][P_DEATHTIMER] = -1;
  149.  
  150. DestroyActor(pedid);
  151. return CallLocalFunction("PED_OnDisconnect", "i", pedid);
  152. }
  153.  
  154. stock PED_SetPos(pedid, Float:x, Float:y, Float:z)
  155. {
  156. if(! PED_IsConnected(pedid)) return false;
  157.  
  158. if(CallLocalFunction("PED_OnUpdate", "i", pedid)) return SetActorPos(pedid, x, y, z);
  159. return false;
  160. }
  161.  
  162. stock PED_GetPos(pedid, &Float:x, &Float:y, &Float:z)
  163. {
  164. if(! PED_IsConnected(pedid)) return false;
  165.  
  166. return GetActorPos(pedid, x, y, z);
  167. }
  168.  
  169. stock PED_SetFacingAngle(pedid, Float:angle)
  170. {
  171. if(! PED_IsConnected(pedid)) return false;
  172.  
  173. if(CallLocalFunction("PED_OnUpdate", "i", pedid)) return SetActorFacingAngle(pedid, angle);
  174. return false;
  175. }
  176.  
  177. stock PED_GetFacingAngle(pedid, &Float:angle)
  178. {
  179. if(! PED_IsConnected(pedid)) return false;
  180.  
  181. return GetActorFacingAngle(pedid, angle);
  182. }
  183.  
  184. stock PED_SetVirtualWorld(pedid, world)
  185. {
  186. if(! PED_IsConnected(pedid)) return false;
  187.  
  188. if(CallLocalFunction("PED_OnUpdate", "i", pedid)) return SetActorVirtualWorld(pedid, world);
  189. return false;
  190. }
  191.  
  192. stock PED_GetVirtualWorld(pedid)
  193. {
  194. if(! PED_IsConnected(pedid)) return false;
  195.  
  196. return GetActorVirtualWorld(pedid);
  197. }
  198.  
  199. stock PED_ToggleInvulnerable(pedid, bool:toggle)
  200. {
  201. if(! PED_IsConnected(pedid)) return false;
  202.  
  203. if(CallLocalFunction("PED_OnUpdate", "i", pedid)) return SetActorInvulnerable(pedid, toggle);
  204. return false;
  205. }
  206.  
  207. stock PED_IsInvulnerable(pedid)
  208. {
  209. if(! PED_IsConnected(pedid)) return false;
  210.  
  211. return IsActorInvulnerable(pedid);
  212. }
  213.  
  214. stock PED_SetFacingPoint(pedid, Float:x, Float:y)
  215. {
  216. if(! PED_IsConnected(pedid)) return false;
  217.  
  218. if(CallLocalFunction("PED_OnUpdate", "i", pedid))
  219. {
  220. new Float:pX, Float:pY, Float:pZ;
  221. PED_GetPos(pedid, pX, pY, pZ);
  222.  
  223. new Float:angle;
  224.  
  225. if( y > pY ) angle = (-acos((x - pX) / floatsqroot((x - pX)*(x - pX) + (y - pY)*(y - pY))) - 90.0);
  226. else if( y < pY && x < pX ) angle = (acos((x - pX) / floatsqroot((x - pX)*(x - pX) + (y - pY)*(y - pY))) - 450.0);
  227. else if( y < pY ) angle = (acos((x - pX) / floatsqroot((x - pX)*(x - pX) + (y - pY)*(y - pY))) - 90.0);
  228.  
  229. if(x > pX) angle = (floatabs(floatabs(angle) + 180.0));
  230. else angle = (floatabs(angle) - 180.0);
  231.  
  232. return PED_SetFacingAngle(pedid, angle);
  233. }
  234. return false;
  235. }
  236.  
  237. stock PED_IsFacingPoint(pedid, Float:x, Float:y, Float:range = 10.0)
  238. {
  239. if(! PED_IsConnected(pedid)) return false;
  240.  
  241. new Float:X, Float:Y, Float:Z, Float:A;
  242. PED_GetPos(pedid, X, Y, Z);
  243. PED_GetFacingAngle(pedid, A);
  244.  
  245. new Float:angle;
  246.  
  247. if( Y > y ) angle = (-acos((X - x) / floatsqroot((X - x)*(X - x) + (Y - y)*(Y - y))) - 90.0);
  248. else if( Y < y && X < x ) angle = (acos((X - x) / floatsqroot((X - x)*(X - x) + (Y - y)*(Y - y))) - 450.0);
  249. else if( Y < y ) angle = (acos((X - x) / floatsqroot((X - x)*(X - x) + (Y - y)*(Y - y))) - 90.0);
  250.  
  251. return (PED_AngleInRangeOfAngle(-angle, A, range));
  252. }
  253.  
  254. stock PED_SetFacingPlayer(pedid, playerid)
  255. {
  256. if(! PED_IsConnected(pedid)) return false;
  257. if(! IsPlayerConnected(playerid)) return false;
  258.  
  259. if(CallLocalFunction("PED_OnUpdate", "i", pedid))
  260. {
  261. new Float:pX, Float:pY, Float:pZ;
  262. GetPlayerPos(playerid, pX, pY, pZ);
  263.  
  264. return PED_SetFacingPoint(pedid, pX, pY);
  265. }
  266. return false;
  267. }
  268.  
  269. stock PED_IsFacingPlayer(pedid, playerid, Float:range = 10.0)
  270. {
  271. if(! PED_IsConnected(pedid)) return false;
  272. if(! IsPlayerConnected(playerid)) return false;
  273.  
  274. new Float:pX, Float:pY, Float:pZ;
  275. GetPlayerPos(playerid, pX, pY, pZ);
  276.  
  277. return PED_IsFacingPoint(pedid, pX, pY, range);
  278. }
  279.  
  280. stock PED_IsBehindPlayer(pedid, playerid, Float:range = 10.0)
  281. {
  282. if(! PED_IsConnected(pedid)) return false;
  283. if(! IsPlayerConnected(playerid)) return false;
  284.  
  285. new Float:za, Float:pa;
  286. PED_GetFacingAngle(pedid, za);
  287. GetPlayerFacingAngle(playerid, pa);
  288.  
  289. return (PED_AngleInRangeOfAngle(za, pa, range) && PED_IsFacingPlayer(playerid, playerid));
  290. }
  291.  
  292. stock PED_IsInRangeOfPoint(pedid, Float:range, Float:x, Float:y, Float:z)
  293. {
  294. if(! PED_IsConnected(pedid)) return false;
  295.  
  296. new Float:pos[3];
  297. PED_GetPos(pedid, pos[0], pos[1], pos[2]);
  298.  
  299. return (PED_GetDistance(pos[0], pos[1], pos[2], x, y, z) <= range);
  300. }
  301.  
  302. stock PED_SetHealth(pedid, Float:health)
  303. {
  304. if(! PED_IsConnected(pedid)) return false;
  305. if(PED_IsDead(pedid)) return false;
  306.  
  307. if(CallLocalFunction("PED_OnUpdate", "i", pedid))
  308. {
  309. if(health <= 0.0)
  310. {
  311. if(CallLocalFunction("PED_OnDeath", "iii", pedid, INVALID_PLAYER_ID, 0))
  312. {
  313. if(gPED[pedid][P_DEATHTIMER] != -1) KillTimer(gPED[pedid][P_DEATHTIMER]);
  314. gPED[pedid][P_DEATHTIMER] = SetTimerEx("PED_SpawnPlayerAfterDeath", 3 * 1000 + 5 * 100, false, "i", pedid);//spawn after 3.5 seconds
  315.  
  316. SetActorHealth(pedid, health);
  317. }
  318. else return false;
  319. }
  320. else return SetActorHealth(pedid, health);
  321. }
  322. return false;
  323. }
  324.  
  325. stock PED_GetHealth(pedid, &Float:health)
  326. {
  327. if(! PED_IsConnected(pedid)) return false;
  328.  
  329. return GetActorHealth(pedid, health);
  330. }
  331.  
  332. stock PED_IsDead(pedid)
  333. {
  334. if(! PED_IsConnected(pedid)) return false;
  335.  
  336. new Float:health;
  337. PED_GetHealth(pedid, health);
  338. if(health <= 0.0) return true;
  339. return false;
  340. }
  341.  
  342. stock PED_ApplyAnimation(pedid, animlib[], animname[], Float:fDelta = 4.1, loop = 0, lockx = 1, locky = 1, freeze = 1, time = 0)
  343. {
  344. if(! PED_IsConnected(pedid)) return false;
  345. if(PED_IsDead(pedid)) return false;
  346.  
  347. if(CallLocalFunction("PED_OnUpdate", "i", pedid)) return ApplyActorAnimation(pedid, animlib, animname, fDelta, loop, lockx, locky, freeze, time);
  348. return false;
  349. }
  350.  
  351. stock PED_Stop(pedid)
  352. {
  353. if(! PED_IsConnected(pedid)) return false;
  354. if(PED_IsDead(pedid)) return false;
  355.  
  356. if(CallLocalFunction("PED_OnUpdate", "i", pedid)) return ClearActorAnimations(pedid);
  357. return false;
  358. }
  359.  
  360. stock PED_Spawn(pedid)
  361. {
  362. if(! PED_IsConnected(pedid)) return false;
  363.  
  364. if(CallLocalFunction("PED_OnUpdate", "i", pedid))
  365. {
  366. new bool:invulnerable = false;
  367. if(PED_IsInvulnerable(pedid)) invulnerable = true;
  368.  
  369. DestroyActor(pedid);
  370. CreateActor(gPED[pedid][P_SKIN], gPED[pedid][P_X], gPED[pedid][P_Y], gPED[pedid][P_Z], gPED[pedid][P_ROT]);
  371. SetActorHealth(pedid, gPED[pedid][P_HEALTH]);
  372. SetActorInvulnerable(pedid, invulnerable);
  373.  
  374. foreach_player(i)
  375. {
  376. if(gPlayerTarget[i] == pedid) gPlayerTarget[i] = INVALID_PED_ID;
  377. }
  378.  
  379. CallLocalFunction("PED_OnSpawn", "i", pedid);
  380. }
  381. return false;
  382. }
  383.  
  384. stock PED_SetSpawnInfo(pedid, Float:x, Float:y, Float:z, Float:rotation, Float:health)
  385. {
  386. if(! PED_IsConnected(pedid)) return false;
  387.  
  388. gPED[pedid][P_X] = x;
  389. gPED[pedid][P_Y] = y;
  390. gPED[pedid][P_Z] = z;
  391. gPED[pedid][P_ROT] = rotation;
  392. gPED[pedid][P_HEALTH] = health;
  393. return true;
  394. }
  395.  
  396. stock PED_IsStreamedIn(pedid, forplayerid)
  397. {
  398. if(! PED_IsConnected(pedid)) return false;
  399. if(! IsPlayerConnected(forplayerid)) return false;
  400.  
  401. return IsActorStreamedIn(pedid, forplayerid);
  402. }
  403.  
  404. stock PED_PlaySound(pedid, soundid)
  405. {
  406. if(! PED_IsConnected(pedid)) return false;
  407. if(! IsPlayerConnected(playerid)) return false;
  408.  
  409. new Float:ped_pos[3];
  410. PED_GetPos(pedid, ped_pos[0], ped_pos[1], ped_pos[2]);
  411. foreach_player(i) PlayerPlaySound(i, soundid, ped_pos[0], ped_pos[1], ped_pos[2]);
  412. return true;
  413. }
  414.  
  415. //player functions
  416. stock GetPlayerCameraTargetPED(playerid)
  417. {
  418. if(! IsPlayerConnected(playerid)) return false;
  419.  
  420. return GetPlayerCameraTargetActor(playerid);
  421. }
  422.  
  423. stock GetPlayerTargetPED(playerid)
  424. {
  425. if(! IsPlayerConnected(playerid)) return false;
  426.  
  427. return GetPlayerTargetActor(playerid);
  428. }
  429.  
  430. public OnPlayerUpdate(playerid)
  431. {
  432. new target_ped = GetPlayerTargetPED(playerid);
  433. if(target_ped != INVALID_PED_ID)
  434. {
  435. if(gPlayerTarget[playerid] != target_ped)
  436. {
  437. gPlayerTarget[playerid] = target_ped;
  438. CallLocalFunction("OnPlayerTargetPED", "iii", playerid, target_ped, GetPlayerWeapon(playerid));
  439. }
  440. }
  441.  
  442. #if defined HoOK_OnPlayerUpdate
  443. HoOK_OnPlayerUpdate(playerid);
  444. #endif
  445. return 1;
  446. }
  447. #if defined _ALS_OnPlayerUpdate
  448. #undef OnPlayerUpdate
  449. #else
  450. #define _ALS_OnPlayerUpdate
  451. #endif
  452. #define OnPlayerUpdate HoOK_OnPlayerUpdate
  453. #if defined HoOK_OnPlayerUpdate
  454. forward HoOK_OnPlayerUpdate(playerid);
  455. #endif
  456.  
  457. public OnActorStreamIn(actorid, forplayerid)
  458. {
  459. if(PED_IsConnected(actorid)) CallLocalFunction("PED_OnStreamIn", "ii", actorid, forplayerid);
  460.  
  461. #if defined HoOK_OnActorStreamIn
  462. HoOK_OnActorStreamIn(actorid, forplayerid);
  463. #endif
  464. return 1;
  465. }
  466. #if defined _ALS_OnActorStreamIn
  467. #undef OnActorStreamIn
  468. #else
  469. #define _ALS_OnActorStreamIn
  470. #endif
  471. #define OnActorStreamIn HoOK_OnActorStreamIn
  472. #if defined HoOK_OnActorStreamIn
  473. forward HoOK_OnActorStreamIn(actorid, forplayerid);
  474. #endif
  475.  
  476. public OnActorStreamOut(actorid, forplayerid)
  477. {
  478. if(PED_IsConnected(actorid)) CallLocalFunction("PED_OnStreamOut", "ii", actorid, forplayerid);
  479.  
  480. #if defined HoOK_OnActorStreamOut
  481. HoOK_OnActorStreamOut(actorid, forplayerid);
  482. #endif
  483. return 1;
  484. }
  485. #if defined _ALS_OnActorStreamOut
  486. #undef OnActorStreamOut
  487. #else
  488. #define _ALS_OnActorStreamOut
  489. #endif
  490. #define OnActorStreamOut HoOK_OnActorStreamOut
  491. #if defined HoOK_OnActorStreamOut
  492. forward HoOK_OnActorStreamOut(actorid, forplayerid);
  493. #endif
  494.  
  495. public OnPlayerGiveDamageActor(playerid, damaged_actorid, Float:amount, weaponid, bodypart)
  496. {
  497.  
  498. if(! PED_IsInvulnerable(damaged_actorid))
  499. {
  500. if(! PED_IsDead(damaged_actorid))
  501. {
  502. if(! CallLocalFunction("PED_OnTakeDamage", "iiifi", damaged_actorid, playerid, weaponid, amount, bodypart))
  503. {
  504. CallLocalFunction("OnPlayerGivePEDDamage", "iiifi", playerid, damaged_actorid, weaponid, amount, bodypart);
  505. return 0;
  506. }
  507. else
  508. {
  509. new Float:ped_health;
  510. PED_GetHealth(damaged_actorid, ped_health);
  511. ped_health -= amount;
  512.  
  513. CallLocalFunction("OnPlayerGivePEDDamage", "iiifi", playerid, damaged_actorid, weaponid, amount, bodypart);
  514. if(ped_health <= 0.0)//if the ped is dead
  515. {
  516. if(CallLocalFunction("PED_OnDeath", "iii", damaged_actorid, playerid, weaponid))
  517. {
  518. SetActorHealth(damaged_actorid, 0.0);
  519.  
  520. if(gPED[damaged_actorid][P_DEATHTIMER] != -1) KillTimer(gPED[damaged_actorid][P_DEATHTIMER]);
  521. gPED[damaged_actorid][P_DEATHTIMER] = SetTimerEx("PED_SpawnPlayerAfterDeath", 3 * 1000 + 5 * 100, false, "i", damaged_actorid);//spawn after 3.5 seconds
  522. }
  523. }
  524. else SetActorHealth(damaged_actorid, ped_health);
  525. }
  526. }
  527. }
  528.  
  529. #if defined HoOK_OnPlayerGiveDamageActor
  530. HoOK_OnPlayerGiveDamageActor(playerid, damaged_actorid, Float:amount, weaponid, bodypart);
  531. #endif
  532. return 1;
  533. }
  534. #if defined _ALS_OnPlayerGiveDamageActor
  535. #undef OnPlayerGiveDamageActor
  536. #else
  537. #define _ALS_OnPlayerGiveDamageActor
  538. #endif
  539. #define OnPlayerGiveDamageActor HoOK_OnPlayerGiveDamageActor
  540. #if defined HoOK_OnPlayerGiveDamageActor
  541. forward HoOK_OnPlayerGiveDamageActor(playerid, damaged_actorid, Float:amount, weaponid, bodypart);
  542. #endif
  543.  
  544. forward PED_SpawnPlayerAfterDeath(pedid);
  545. public PED_SpawnPlayerAfterDeath(pedid) return (gPED[pedid][P_DEATHTIMER] = -1, PED_Spawn(pedid));
  546.  
  547. forward PED_OnConnect(pedid);
  548. forward PED_OnDisconnect(pedid);
  549. forward PED_OnSpawn(pedid);
  550. forward PED_OnTakeDamage(pedid, issuerid, weaponid, Float:amount, bodypart);
  551. forward PED_OnDeath(pedid, killerid, weaponid);
  552. forward PED_OnStreamIn(pedid, forplayerid);
  553. forward PED_OnStreamOut(pedid, forplayerid);
  554. forward PED_OnUpdate(pedid);
  555.  
  556. forward OnPlayerTargetPED(playerid, pedid, weaponid);
  557. forward OnPlayerGivePEDDamage(playerid, pedid, weaponid, Float:amount, bodypart);
Advertisement
Add Comment
Please, Sign In to add comment