Guest User

Untitled

a guest
Mar 15th, 2012
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. main();
  4.  
  5. new pobjectid = -1;
  6. new parrayindex = 0;
  7.  
  8. new pobjectarray[56] =
  9. {
  10. 1374,
  11. 1383,
  12. 1386,
  13. 16328,
  14. 16329,
  15. 16330,
  16. 16331,
  17. 16332,
  18. 16333,
  19. 1382,
  20. 1383,
  21. 1384,
  22. 1385,
  23. 1386,
  24. 1387,
  25. 1388,
  26. 1389,
  27. 1390,
  28. 1391,
  29. 1392,
  30. 1393,
  31. 1394,
  32. 1395,
  33. 1396,
  34. 1397,
  35. 1398,
  36. 1399,
  37. 1400,
  38. 1401,
  39. 1402,
  40. 1403,
  41. 1404,
  42. 1405,
  43. 1406,
  44. 6010,
  45. 6034,
  46. 6033,
  47. 6013,
  48. 6014,
  49. 6015,
  50. 6016,
  51. 6017,
  52. 6018,
  53. 6019,
  54. 6020,
  55. 6021,
  56. 6022,
  57. 6023,
  58. 6024,
  59. 6025,
  60. 6026,
  61. 6027,
  62. 6028,
  63. 6030,
  64. 6031,
  65. 6032,
  66. };
  67.  
  68. public OnGameModeInit()
  69. {
  70. return 1;
  71. }
  72.  
  73. public OnGameModeExit()
  74. {
  75. return 1;
  76. }
  77.  
  78. public OnPlayerCommandText(playerid, cmdtext[])
  79. {
  80. if (strcmp("/o", cmdtext, true, 10) == 0)
  81. {
  82. if(pobjectid != -1)
  83. {
  84. printf("destroy id %d modelid %d", pobjectid, pobjectarray[parrayindex - 1]);
  85. DestroyObject(pobjectid);
  86. }
  87. new Float:x, Float:y, Float:z;
  88. GetPlayerPos(playerid, x, y, z);
  89.  
  90. pobjectid = CreateObject(pobjectarray[parrayindex], x + 5.0, y + 5.0, z + 4.0, 0, 0, 0);
  91.  
  92. printf("id %d modelid %d", pobjectid, pobjectarray[parrayindex]);
  93.  
  94. parrayindex++;
  95.  
  96. if(parrayindex >= 56)parrayindex = 0;
  97.  
  98. return 1;
  99. }
  100. return 0;
  101. }
Advertisement
Add Comment
Please, Sign In to add comment