Advertisement
djhonga2001

GTAV - Attach beach fire

Nov 18th, 2016
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. void beachFireEmUp()
  2. { // prop_beach_fire
  3. for (int i = 0; i < 32; i++)
  4. {
  5. Player playerHandle = PLAYER::GET_PLAYER_PED(i);
  6. Hash beach_fire = GAMEPLAY::GET_HASH_KEY("prop_beach_fire");
  7. STREAMING::REQUEST_MODEL(beach_fire);
  8. while (!STREAMING::HAS_MODEL_LOADED(beach_fire)) WAIT(0);
  9. notifyAboveMap("~HUD_COLOUR_RED~Attached Beach Fires to All Players");
  10. if (ENTITY::DOES_ENTITY_EXIST(playerHandle))
  11. {
  12. if (!strcmp(PLAYER::GET_PLAYER_NAME(PLAYER::INT_TO_PLAYERINDEX(i)), "")) continue;
  13. {
  14. if (!strcmp(PLAYER::GET_PLAYER_NAME(PLAYER::INT_TO_PLAYERINDEX(i)), "")) continue;
  15. {
  16. if (!strcmp(PLAYER::GET_PLAYER_NAME(PLAYER::INT_TO_PLAYERINDEX(i)), "")) continue;
  17. {
  18. if (!strcmp(PLAYER::GET_PLAYER_NAME(PLAYER::INT_TO_PLAYERINDEX(i)), "")) continue;
  19. {
  20. if (PLAYER::GET_PLAYER_PED(i) == PLAYER::PLAYER_PED_ID()) continue;
  21. {
  22. Object object = OBJECT::CREATE_OBJECT(beach_fire, 0, 0, 0, true, true, false);
  23. ENTITY::ATTACH_ENTITY_TO_ENTITY(object, playerHandle, PED::GET_PED_BONE_INDEX(playerHandle, SKEL_Spine_Root), 0.0, 0.0, 0.0, 0.0, 90.0, 0, false, false, false, false, 2, true);
  24. }
  25. STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(beach_fire);
  26. }
  27. }
  28. }
  29. }
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement