XADRENALINEIX

Muskelprotze's Attach Random Coloured Cube To Net Player

May 18th, 2013
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. void CubeifyChar(Ped ped){
  2. if(DOES_CHAR_EXIST(ped)){
  3. uint cubes[6],rand;
  4. Object otmp;
  5. cubes[0] = 0x2718C626;
  6. cubes[1] = 0xDD28B247;
  7. cubes[2] = 0xCCEA11CA;
  8. cubes[3] = 0xBB1F6E71;
  9. cubes[4] = 0xA6E545FD;
  10. cubes[5] = 0x5C5030D4;
  11. GENERATE_RANDOM_INT_IN_RANGE(0,5,&rand);
  12.  
  13. CREATE_OBJECT(cubes[rand],0.0,0.0,0.0,&otmp,true);
  14.  
  15. ATTACH_OBJECT_TO_PED(otmp,ped,0x4B5,0.0,0.0,0.0,0.0,0.0,3.0,false);
  16. WAIT(10);
  17. MARK_OBJECT_AS_NO_LONGER_NEEDED(&otmp); //Free up some memory ;)
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment