Advertisement
Guest User

Actor System By Andra

a guest
Jul 30th, 2016
1,821
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.46 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. //#define FILTERSCRIPT
  4.  
  5. //This FS created by :andra
  6. // if you have some problems,contact me : facebook.com/CrunchXnoy
  7. //Thanks.
  8.  
  9. #include <a_samp>
  10. #include <a_actor>
  11.  
  12.  
  13. #if defined FILTERSCRIPT
  14.  
  15. #define MAX_ACTORS 200 //You can define max actor here
  16. #define DIALOG_ACANIM 5306
  17. #define COLOR_WHITE 0xFFFFFFAA
  18. #define MAX_STRING 255
  19.  
  20.  
  21. public OnFilterScriptInit()
  22. {
  23. print("\n--------------------------------------");
  24. print(" Blank Filterscript by your name here");
  25. print("--------------------------------------\n");
  26. LoadActors();
  27. return 1;
  28. }
  29.  
  30. public OnFilterScriptExit()
  31. {
  32. return 1;
  33. }
  34.  
  35. #else
  36.  
  37. main()
  38. {
  39. print("\n----------------------------------");
  40. print(" Blank Gamemode by your name here");
  41. print("----------------------------------\n");
  42. }
  43.  
  44. #endif
  45.  
  46. enum aInfo
  47. {
  48. aId,
  49. Text3D: aTId,
  50. aSkin,
  51. aAnim,
  52. Float:aPosX,
  53. Float:aPosY,
  54. Float:aPosZ,
  55. Float:aPosR,
  56. aName[80],
  57. aVW,
  58. aInt
  59. }
  60.  
  61. new ActorsInfo[MAX_ACTORS][aInfo];
  62.  
  63. CreateActors(actorid)
  64. {
  65. new string[128];
  66. format(string, sizeof(string), "{00BFFF}[Actor:%d]\n{FFFFFF}%s",actorid, ActorsInfo[actorid][aName]);
  67.  
  68. ActorsInfo[actorid][aId] = CreateActor(ActorsInfo[actorid][aSkin], ActorsInfo[actorid][aPosX], ActorsInfo[actorid][aPosY], ActorsInfo[actorid][aPosZ], ActorsInfo[actorid][aPosR]);
  69. ActorsInfo[actorid][aTId] = CreateDynamic3DTextLabel(string, COLOR_WHITE, ActorsInfo[actorid][aPosX], ActorsInfo[actorid][aPosY], ActorsInfo[actorid][aPosZ]+1,10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, ActorsInfo[actorid][aVW], ActorsInfo[actorid][aInt], -1);
  70. switch(ActorsInfo[actorid][aAnim])
  71. {
  72. case 1: {ApplyActorAnimation(actorid,"ped","SEAT_down",4.0,0,0,0,1,0);}
  73. case 2: {ApplyActorAnimation(actorid,"ped","Idlestance_fat",4.0,0,0,0,1,0);}
  74. case 3: {ApplyActorAnimation(actorid,"ped","Idlestance_old",4.0,0,0,0,1,0);}
  75. case 4: {ApplyActorAnimation(actorid,"POOL","POOL_Idle_Stance",4.0,0,0,0,1,0);}
  76. case 5: {ApplyActorAnimation(actorid,"ped","woman_idlestance",4.0,0,0,0,1,0);}
  77. case 6: {ApplyActorAnimation(actorid,"ped","IDLE_stance",4.0,0,0,0,1,0);}
  78. case 7: {ApplyActorAnimation(actorid,"COP_AMBIENT","Copbrowse_in",4.0,0,0,0,1,0);}
  79. case 8: {ApplyActorAnimation(actorid,"COP_AMBIENT","Copbrowse_loop",4.0,0,0,0,1,0);}
  80. case 9: {ApplyActorAnimation(actorid,"COP_AMBIENT","Copbrowse_nod",4.0,0,0,0,1,0);}
  81. case 10: {ApplyActorAnimation(actorid,"COP_AMBIENT","Copbrowse_out",4.0,0,0,0,1,0);}
  82. case 11: {ApplyActorAnimation(actorid,"COP_AMBIENT","Copbrowse_shake",4.0,0,0,0,1,0);}
  83. case 12: {ApplyActorAnimation(actorid,"COP_AMBIENT","Coplook_in",4.0,0,0,0,1,0);}
  84. case 13: {ApplyActorAnimation(actorid,"COP_AMBIENT","Coplook_loop",4.0,0,0,0,1,0);}
  85. case 14: {ApplyActorAnimation(actorid,"COP_AMBIENT","Coplook_nod",4.0,0,0,0,1,0);}
  86. case 15: {ApplyActorAnimation(actorid,"COP_AMBIENT","Coplook_out",4.0,0,0,0,1,0);}
  87. case 16: {ApplyActorAnimation(actorid,"COP_AMBIENT","Coplook_shake",4.0,0,0,0,1,0);}
  88. case 17: {ApplyActorAnimation(actorid,"COP_AMBIENT","Coplook_think",4.0,0,0,0,1,0);}
  89. case 18: {ApplyActorAnimation(actorid,"COP_AMBIENT","Coplook_watch",4.0,0,0,0,1,0);}
  90. }
  91. }
  92.  
  93. LoadActors()
  94. {
  95. new arrCoords[25][64];
  96. new strFromFile2[256];
  97. new File: file = fopen("actors.cfg", io_read);
  98. if (file)
  99. {
  100. new idx;
  101. while (idx < sizeof(ActorsInfo))
  102. {
  103. fread(file, strFromFile2);
  104. splits(strFromFile2, arrCoords, '|');
  105. ActorsInfo[idx][aId] = strval(arrCoords[0]);
  106. ActorsInfo[idx][aSkin] = strval(arrCoords[1]);
  107. ActorsInfo[idx][aAnim] = strval(arrCoords[2]);
  108. ActorsInfo[idx][aPosX] = floatstr(arrCoords[3]);
  109. ActorsInfo[idx][aPosY] = floatstr(arrCoords[4]);
  110. ActorsInfo[idx][aPosZ] = floatstr(arrCoords[5]);
  111. ActorsInfo[idx][aPosR] = floatstr(arrCoords[6]);
  112. strmid(ActorsInfo[idx][aName], arrCoords[7], 0, strlen(arrCoords[7]), 80);
  113. ActorsInfo[idx][aVW] = strval(arrCoords[8]);
  114. ActorsInfo[idx][aInt] = strval(arrCoords[9]);
  115.  
  116. if(ActorsInfo[idx][aPosX])
  117. {
  118. if(!IsNull(ActorsInfo[idx][aName]))
  119. {
  120. CreateActors(idx);
  121. }
  122. }
  123.  
  124. idx++;
  125. }
  126. fclose(file);
  127. }
  128. return 1;
  129. }
  130.  
  131. SaveActors() {
  132.  
  133. new
  134. szFileStr[512],
  135. File: fHandle = fopen("actors.cfg", io_write);
  136.  
  137. for(new iIndex; iIndex < MAX_ACTORS; iIndex++) {
  138. format(szFileStr, sizeof(szFileStr), "%d|%d|%d|%f|%f|%f|%f|%s|%d|%d\r\n",
  139. ActorsInfo[iIndex][aId],
  140. ActorsInfo[iIndex][aSkin],
  141. ActorsInfo[iIndex][aAnim],
  142. ActorsInfo[iIndex][aPosX],
  143. ActorsInfo[iIndex][aPosY],
  144. ActorsInfo[iIndex][aPosZ],
  145. ActorsInfo[iIndex][aPosR],
  146. ActorsInfo[iIndex][aName],
  147. ActorsInfo[iIndex][aVW],
  148. ActorsInfo[iIndex][aInt]
  149. );
  150. fwrite(fHandle, szFileStr);
  151. }
  152. return fclose(fHandle);
  153. }
  154.  
  155. //here is the command
  156. CMD:createactor(playerid, params[])
  157. {
  158. new string[128], skin, name[80];
  159. if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_GREY, "{A9A9A9}ERROR: You don't have permission to use command.");
  160. if(sscanf(params, "is[80]", skin, name)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: '/createactor' [skinid] [name]");
  161. new Float:X,Float:Y,Float:Z;
  162. for(new idx=0; idx<MAX_ACTORS; idx++)
  163. {
  164. if(!ActorsInfo[idx][aSkin])
  165. {
  166. GetPlayerPos(playerid, ActorsInfo[idx][aPosX], ActorsInfo[idx][aPosY], ActorsInfo[idx][aPosZ]);
  167. GetPlayerFacingAngle(playerid, ActorsInfo[idx][aPosR]);
  168. GetPlayerPos(playerid, X,Y,Z);
  169. SetPlayerPos(playerid, X,Y,Z+5);
  170. ActorsInfo[idx][aSkin] = skin;
  171. format(ActorsInfo[idx][aName], 80, "%s", name);
  172. CreateActors(idx);
  173. // Text
  174. format(string, sizeof(string), "AdmCmd: %s telah membuat Actors ID %d. (Skin: %d ; Name: %s)", GetPlayerNameEx(playerid), idx, skin, name);
  175. ABroadCast(COLOR_LIGHTRED, string, 4);
  176. Log("logs/actors.log", string);
  177. idx = MAX_ACTORS;
  178. SaveActors();
  179. }
  180. }
  181. return 1;
  182. }
  183.  
  184. CMD:aused(playerid, params[])
  185. {
  186. new string[128];
  187. if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an authorized to use this command.");
  188. SendClientMessage(playerid, COLOR_YELLOW, "[Used Actors]:");
  189. for(new idx=0; idx<MAX_ACTORS; idx++)
  190. {
  191. if(ActorsInfo[idx][aId])
  192. {
  193. format(string, sizeof(string), "ID: %d | Skin: %d | VW: %d | Int: %d", idx, ActorsInfo[idx][aSkin], ActorsInfo[idx][aVW], ActorsInfo[idx][aInt]);
  194. SendClientMessage(playerid, COLOR_WHITE, string);
  195. }
  196. }
  197. return 1;
  198. }
  199.  
  200. CMD:gotoactor(playerid, params[])
  201. {
  202. new idx, string[128];
  203. if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_GREY, "{A9A9A9}ERROR: You don't have permission to use command.");
  204. if(sscanf(params, "i", idx)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: '/gotoactor' [actorid]");
  205. if(!ActorsInfo[idx][aId]) return SendClientMessage(playerid, COLOR_GREY, "ERROR: Invalid actors id.");
  206. SetPlayerPos(playerid, ActorsInfo[idx][aPosX], ActorsInfo[idx][aPosY], ActorsInfo[idx][aPosZ]);
  207. format(string, sizeof(string), "{B0C4DE}TELE: {FFFFFF}You have teleported to actors ID %d.", idx);
  208. SendClientMessage(playerid, COLOR_WHITE, string);
  209. return 1;
  210. }
  211.  
  212. CMD:acname(playerid, params[])
  213. {
  214. if(IsPlayerAdmin(playerid))
  215. {
  216. SendClientMessage(playerid, COLOR_GRAD2, "{A9A9A9}ERROR: You don't have permission to use command.");
  217. return 1;
  218. }
  219.  
  220. new string[128], actorid, actorname[128];
  221.  
  222. if(sscanf(params, "ds[128]", actorid, actorname)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: '/acname' [actorid] [name]");
  223.  
  224. format(ActorsInfo[actorid][aName], 80, "%s", actorname);
  225. SendClientMessage(playerid, COLOR_WHITE, "ACTORSINFO: You have changed the name of the actors!");
  226. if(IsValidActor(ActorsInfo[actorid][aId])) DestroyActor(ActorsInfo[actorid][aId]);
  227. if(IsValidDynamic3DTextLabel(ActorsInfo[actorid][aTId])) DestroyDynamic3DTextLabel(ActorsInfo[actorid][aTId]);
  228. CreateActors(actorid);
  229. SaveActors();
  230.  
  231. format(string, sizeof(string), "ACTORSINFO: %s has edited actors [ID:%d]'s Name to %s.", GetPlayerNameEx(playerid), actorid, actorname);
  232. Log("logs/aedit.log", string);
  233. return 1;
  234. }
  235.  
  236. CMD:anear(playerid, params[])
  237. {
  238. if(IsPlayerAdmin(playerid))
  239. {
  240. SendClientMessage(playerid, COLOR_WHITE, "NOTE: Listing all Actors within 30 meters of you");
  241. new Float:X, Float:Y, Float:Z;
  242. GetPlayerPos(playerid, X, Y, Z);
  243. for(new i;i<MAX_ACTORS;i++)
  244. {
  245. if(IsPlayerInRangeOfPoint(playerid, 30, ActorsInfo[i][aPosX], ActorsInfo[i][aPosY], ActorsInfo[i][aPosZ]))
  246. {
  247. new string[128];
  248. format(string, sizeof(string), "[ID:%d] | Coordinat: %f ", i, GetDistance(ActorsInfo[i][aPosX], ActorsInfo[i][aPosY], ActorsInfo[i][aPosZ], X, Y, Z));
  249. SendClientMessage(playerid, COLOR_WHITE, string);
  250. }
  251. }
  252. }
  253. else
  254. {
  255. SendClientMessage(playerid, COLOR_GRAD2, "{A9A9A9}ERROR: You don't have permission to use command.");
  256. }
  257. return 1;
  258. }
  259.  
  260. CMD:acanim(playerid, params[])
  261. {
  262. if(IsPlayerAdmin(playerid))
  263. {
  264. SendClientMessage(playerid, COLOR_GRAD2, "{A9A9A9}ERROR: You don't have permission to use command.");
  265. return 1;
  266. }
  267.  
  268. new actorid;
  269. if(sscanf(params, "d", actorid))
  270. {
  271. SendClientMessage(playerid, COLOR_WHITE, "USAGE: '/acanim' [actorid]");
  272. return 1;
  273. }
  274.  
  275. SetPVarInt(playerid, "aPlayAnim", actorid);
  276. if(actorid >= MAX_ACTORS)
  277. {
  278. SendClientMessage( playerid, COLOR_WHITE, "{A9A9A9}ERROR: Invalid Actors ID!");
  279. return 1;
  280. }
  281.  
  282. ShowPlayerDialog(playerid, DIALOG_ACANIM, DIALOG_STYLE_LIST, "Actor Anim", "Seat down\nIdlestance Fat\nIdlestance Old\nPool Idle Stance\nWoman Idlestance\nIdle Stance\nCopbrowse In\nCopbrowse Loop\nCopbrowse Nod\nCopbrowse Out\nCopbrowse shake\nCoplook In\nCoplook Loop\nCoplook Nod\nCoplook Out\nCoplook Shake\nCoplook Think\nCoplook Watch", "Choose", "Close");
  283. return 1;
  284. }
  285.  
  286. CMD:aedit(playerid, params[])
  287. {
  288. if(IsPlayerAdmin(playerid))
  289. {
  290. SendClientMessage(playerid, COLOR_GRAD2, "{A9A9A9}ERROR: You don't have permission to use command.");
  291. return 1;
  292. }
  293.  
  294. new string[128], choice[32], actorid, amount;
  295. if(sscanf(params, "s[32]dD", choice, actorid, amount))
  296. {
  297. SendClientMessage(playerid, COLOR_WHITE, "USAGE: '/aedit' [name] [actorid] [amount]");
  298. SendClientMessage(playerid, COLOR_GREY, "NAME: '/acname', '/acanim', Exterior, Skin, Delete, Refresh, Clearanim");
  299. return 1;
  300. }
  301.  
  302. if(actorid >= MAX_ACTORS)
  303. {
  304. SendClientMessage( playerid, COLOR_WHITE, "{A9A9A9}ERROR: Invalid Actors ID!");
  305. return 1;
  306. }
  307.  
  308. if(strcmp(choice, "exterior", true) == 0)
  309. {
  310. if(ActorsInfo[actorid][aPosX])
  311. {
  312. if(!IsNull(ActorsInfo[actorid][aName]))
  313. {
  314. GetPlayerPos(playerid, ActorsInfo[actorid][aPosX], ActorsInfo[actorid][aPosY], ActorsInfo[actorid][aPosZ]);
  315. GetPlayerFacingAngle(playerid, ActorsInfo[actorid][aPosR]);
  316. ActorsInfo[actorid][aVW] = GetPlayerVirtualWorld(playerid);
  317. ActorsInfo[actorid][aInt] = GetPlayerInterior(playerid);
  318. SendClientMessage(playerid, COLOR_WHITE, "{B0C4DE}ACTORS: {FFFFFF}You have changed the exterior!");
  319. if(IsValidActor(ActorsInfo[actorid][aId])) DestroyActor(ActorsInfo[actorid][aId]);
  320. if(IsValidDynamic3DTextLabel(ActorsInfo[actorid][aTId])) DestroyDynamic3DTextLabel(ActorsInfo[actorid][aTId]);
  321. CreateActors(actorid);
  322. SaveActors();
  323. format(string, sizeof(string), "{B0C4DE}ACTORS: Admin {FF0000}%s {FFFFFF}has edited actorid {FFFF00}%d{FFFFFF}'s Exterior.", GetPlayerNameEx(playerid), actorid);
  324. Log("logs/aedit.log", string);
  325. }
  326. else
  327. {
  328. SendClientMessage( playerid, COLOR_WHITE, "{A9A9A9}ERROR: The Actors not created.");
  329. }
  330. }
  331. }
  332. else if(strcmp(choice, "skin", true) == 0)
  333. {
  334. ActorsInfo[actorid][aSkin] = amount;
  335.  
  336. format(string, sizeof(string), "{B0C4DE}ACTORS: {FFFFFF}You have changed skin {FFFF00}%d..", amount);
  337. SendClientMessage(playerid, COLOR_WHITE, string);
  338.  
  339. if(IsValidActor(ActorsInfo[actorid][aId])) DestroyActor(ActorsInfo[actorid][aId]);
  340. if(IsValidDynamic3DTextLabel(ActorsInfo[actorid][aTId])) DestroyDynamic3DTextLabel(ActorsInfo[actorid][aTId]);
  341. CreateActors(actorid);
  342.  
  343. SaveActors();
  344. format(string, sizeof(string), "{B0C4DE}ACTORS: Admin {FF0000}%s {FFFFFF}has edited actorid {FFFF00}%d{FFFFFF}'s Skin.", GetPlayerNameEx(playerid), actorid);
  345. Log("logs/aedit.log", string);
  346. return 1;
  347. }
  348. else if(strcmp(choice, "clearanim", true) == 0)
  349. {
  350. ActorsInfo[actorid][aAnim] = 0;
  351. ClearActorAnimations(actorid);
  352.  
  353. format(string, sizeof(string), "{B0C4DE}ACTORS: {FFFFFF}You have clear animation actorid {FFFF00}%d..", actorid);
  354. SendClientMessage(playerid, COLOR_WHITE, string);
  355.  
  356. SaveActors();
  357. format(string, sizeof(string), "{B0C4DE}ACTORS: Admin {FF0000}%s {FFFFFF}has clear animation actorid {FFFF00}%d.", GetPlayerNameEx(playerid), actorid);
  358. Log("logs/aedit.log", string);
  359. return 1;
  360. }
  361. else if(strcmp(choice, "refresh", true) == 0)
  362. {
  363. format(string, sizeof(string), "{B0C4DE}ACTORS: {FFFFFF}You have refresh actorid {FFFF00}%d..", actorid);
  364. SendClientMessage(playerid, COLOR_WHITE, string);
  365.  
  366. if(IsValidActor(ActorsInfo[actorid][aId])) DestroyActor(ActorsInfo[actorid][aId]);
  367. if(IsValidDynamic3DTextLabel(ActorsInfo[actorid][aTId])) DestroyDynamic3DTextLabel(ActorsInfo[actorid][aTId]);
  368. CreateActors(actorid);
  369.  
  370. SaveActors();
  371. format(string, sizeof(string), "{B0C4DE}ACTORS: Admin {FF0000}%s {FFFFFF}has refresh actorid {FFFF00}%d.", GetPlayerNameEx(playerid), actorid);
  372. Log("logs/aedit.log", string);
  373. return 1;
  374. }
  375. else if(strcmp(choice, "delete", true) == 0)
  376. {
  377. if(IsValidActor(ActorsInfo[actorid][aId])) DestroyActor(ActorsInfo[actorid][aId]);
  378. DestroyDynamic3DTextLabel(ActorsInfo[actorid][aTId]);
  379. ActorsInfo[actorid][aName] = 0;
  380. ActorsInfo[actorid][aVW] = 0;
  381. ActorsInfo[actorid][aInt] = 0;
  382. ActorsInfo[actorid][aPosX] = 0;
  383. ActorsInfo[actorid][aPosY] = 0;
  384. ActorsInfo[actorid][aPosZ] = 0;
  385. ActorsInfo[actorid][aPosR] = 0;
  386. ActorsInfo[actorid][aSkin] = 0;
  387. SaveActors();
  388. format(string, sizeof(string), "{B0C4DE}ACTORS: {FFFFFF}You have delete actor id {FFFF00}%d.", actorid);
  389. SendClientMessage(playerid, COLOR_WHITE, string);
  390. format(string, sizeof(string), "{B0C4DE}ACTORS: Admin {FF0000}%s {FFFFFF}has delete actors{FFFF00}%d", GetPlayerNameEx(playerid), actorid);
  391. Log("logs/aedit.log", string);
  392. return 1;
  393. }
  394. return 1;
  395. }
  396.  
  397. public OnGameModeInit()
  398. {
  399.  
  400. return 1;
  401. }
  402.  
  403. public OnGameModeExit()
  404. {
  405. return 1;
  406. }
  407.  
  408. public OnPlayerRequestClass(playerid, classid)
  409. {
  410. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  411. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  412. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  413. return 1;
  414. }
  415.  
  416. public OnPlayerConnect(playerid)
  417. {
  418. return 1;
  419. }
  420.  
  421. public OnPlayerDisconnect(playerid, reason)
  422. {
  423. return 1;
  424. }
  425.  
  426. public OnPlayerSpawn(playerid)
  427. {
  428. return 1;
  429. }
  430.  
  431. public OnPlayerDeath(playerid, killerid, reason)
  432. {
  433. return 1;
  434. }
  435.  
  436. public OnVehicleSpawn(vehicleid)
  437. {
  438. return 1;
  439. }
  440.  
  441. public OnVehicleDeath(vehicleid, killerid)
  442. {
  443. return 1;
  444. }
  445.  
  446. public OnPlayerText(playerid, text[])
  447. {
  448. return 1;
  449. }
  450.  
  451. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  452. {
  453. return 1;
  454. }
  455.  
  456. public OnPlayerExitVehicle(playerid, vehicleid)
  457. {
  458. return 1;
  459. }
  460.  
  461. public OnPlayerStateChange(playerid, newstate, oldstate)
  462. {
  463. return 1;
  464. }
  465.  
  466. public OnPlayerEnterCheckpoint(playerid)
  467. {
  468. return 1;
  469. }
  470.  
  471. public OnPlayerLeaveCheckpoint(playerid)
  472. {
  473. return 1;
  474. }
  475.  
  476. public OnPlayerEnterRaceCheckpoint(playerid)
  477. {
  478. return 1;
  479. }
  480.  
  481. public OnPlayerLeaveRaceCheckpoint(playerid)
  482. {
  483. return 1;
  484. }
  485.  
  486. public OnRconCommand(cmd[])
  487. {
  488. return 1;
  489. }
  490.  
  491. public OnPlayerRequestSpawn(playerid)
  492. {
  493. return 1;
  494. }
  495.  
  496. public OnObjectMoved(objectid)
  497. {
  498. return 1;
  499. }
  500.  
  501. public OnPlayerObjectMoved(playerid, objectid)
  502. {
  503. return 1;
  504. }
  505.  
  506. public OnPlayerPickUpPickup(playerid, pickupid)
  507. {
  508. return 1;
  509. }
  510.  
  511. public OnVehicleMod(playerid, vehicleid, componentid)
  512. {
  513. return 1;
  514. }
  515.  
  516. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  517. {
  518. return 1;
  519. }
  520.  
  521. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  522. {
  523. return 1;
  524. }
  525.  
  526. public OnPlayerSelectedMenuRow(playerid, row)
  527. {
  528. return 1;
  529. }
  530.  
  531. public OnPlayerExitedMenu(playerid)
  532. {
  533. return 1;
  534. }
  535.  
  536. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  537. {
  538. return 1;
  539. }
  540.  
  541. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  542. {
  543. return 1;
  544. }
  545.  
  546. public OnRconLoginAttempt(ip[], password[], success)
  547. {
  548. return 1;
  549. }
  550.  
  551. public OnPlayerUpdate(playerid)
  552. {
  553. return 1;
  554. }
  555.  
  556. public OnPlayerStreamIn(playerid, forplayerid)
  557. {
  558. return 1;
  559. }
  560.  
  561. public OnPlayerStreamOut(playerid, forplayerid)
  562. {
  563. return 1;
  564. }
  565.  
  566. public OnVehicleStreamIn(vehicleid, forplayerid)
  567. {
  568. return 1;
  569. }
  570.  
  571. public OnVehicleStreamOut(vehicleid, forplayerid)
  572. {
  573. return 1;
  574. }
  575.  
  576. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  577. {
  578. if(dialogid == DIALOG_ACANIM)
  579. {
  580. if(!response) return -1;
  581. new actorid = GetPVarInt(playerid, "aPlayAnim");
  582. if(response)
  583. {
  584. if(listitem == 0)
  585. {
  586. ApplyActorAnimation(actorid,"ped","SEAT_down",4.0,0,0,0,1,0);
  587. ActorsInfo[actorid][aAnim] = 1;
  588. SaveActors();
  589.  
  590. SendClientMessage(playerid, COLOR_WHITE, "{B0C4DE}ACTORS: {FFFFFF}You have changed animation.");
  591. format(string, sizeof(string), "{B0C4DE}ACTORS: Admin {FF0000}%s {FFFFFF}has edited actorid {FFFF00}%d{FFFFFF}'s Animation.", GetPlayerNameEx(playerid), actorid);
  592. Log("logs/acedit.log", string);
  593. }
  594. if(listitem == 1)
  595. {
  596. ApplyActorAnimation(actorid,"ped","Idlestance_fat",4.0,0,0,0,1,0);
  597. ActorsInfo[actorid][aAnim] = 2;
  598. SaveActors();
  599.  
  600. SendClientMessage(playerid, COLOR_WHITE, "{B0C4DE}ACTORS: {FFFFFF}You have changed animation.");
  601. format(string, sizeof(string), "{B0C4DE}ACTORS: Admin {FF0000}%s {FFFFFF}has edited actorid {FFFF00}%d{FFFFFF}'s Animation.", GetPlayerNameEx(playerid), actorid);
  602. Log("logs/acedit.log", string);
  603. }
  604. if(listitem == 2)
  605. {
  606. ApplyActorAnimation(actorid,"ped","Idlestance_old",4.0,0,0,0,1,0);
  607. ActorsInfo[actorid][aAnim] = 3;
  608. SaveActors();
  609.  
  610. SendClientMessage(playerid, COLOR_WHITE, "{B0C4DE}ACTORS: {FFFFFF}You have changed animation.");
  611. format(string, sizeof(string), "{B0C4DE}ACTORS: Admin {FF0000}%s {FFFFFF}has edited actorid {FFFF00}%d{FFFFFF}'s Animation.", GetPlayerNameEx(playerid), actorid);
  612. Log("logs/acedit.log", string);
  613. }
  614. if(listitem == 3)
  615. {
  616. ApplyActorAnimation(actorid,"POOL","POOL_Idle_Stance",4.0,0,0,0,1,0);
  617. ActorsInfo[actorid][aAnim] = 4;
  618. SaveActors();
  619.  
  620. SendClientMessage(playerid, COLOR_WHITE, "{B0C4DE}ACTORS: {FFFFFF}You have changed animation.");
  621. format(string, sizeof(string), "{B0C4DE}ACTORS: Admin {FF0000}%s {FFFFFF}has edited actorid {FFFF00}%d{FFFFFF}'s Animation.", GetPlayerNameEx(playerid), actorid);
  622. Log("logs/acedit.log", string);
  623. }
  624. if(listitem == 4)
  625. {
  626. ApplyActorAnimation(actorid,"ped","woman_idlestance",4.0,0,0,0,1,0);
  627. ActorsInfo[actorid][aAnim] = 5;
  628. SaveActors();
  629.  
  630. SendClientMessage(playerid, COLOR_WHITE, "{B0C4DE}ACTORS: {FFFFFF}You have changed animation.");
  631. format(string, sizeof(string), "{B0C4DE}ACTORS: Admin {FF0000}%s {FFFFFF}has edited actorid {FFFF00}%d{FFFFFF}'s Animation.", GetPlayerNameEx(playerid), actorid);
  632. Log("logs/acedit.log", string);
  633. }
  634. if(listitem == 5)
  635. {
  636. ApplyActorAnimation(actorid,"ped","IDLE_stance",4.0,0,0,0,1,0);
  637. ActorsInfo[actorid][aAnim] = 6;
  638. SaveActors();
  639.  
  640. SendClientMessage(playerid, COLOR_WHITE, "{B0C4DE}ACTORS: {FFFFFF}You have changed animation.");
  641. format(string, sizeof(string), "{B0C4DE}ACTORS: Admin {FF0000}%s {FFFFFF}has edited actorid {FFFF00}%d{FFFFFF}'s Animation.", GetPlayerNameEx(playerid), actorid);
  642. Log("logs/acedit.log", string);
  643. }
  644. if(listitem == 6)
  645. {
  646. ApplyActorAnimation(actorid,"COP_AMBIENT","Copbrowse_in",4.0,0,0,0,1,0);
  647. ActorsInfo[actorid][aAnim] = 7;
  648. SaveActors();
  649.  
  650. SendClientMessage(playerid, COLOR_WHITE, "{B0C4DE}ACTORS: {FFFFFF}You have changed animation.");
  651. format(string, sizeof(string), "{B0C4DE}ACTORS: Admin {FF0000}%s {FFFFFF}has edited actorid {FFFF00}%d{FFFFFF}'s Animation.", GetPlayerNameEx(playerid), actorid);
  652. Log("logs/acedit.log", string);
  653. }
  654. if(listitem == 7)
  655. {
  656. ApplyActorAnimation(actorid,"COP_AMBIENT","Copbrowse_loop",4.0,0,0,0,1,0);
  657. ActorsInfo[actorid][aAnim] = 8;
  658. SaveActors();
  659.  
  660. SendClientMessage(playerid, COLOR_WHITE, "{B0C4DE}ACTORS: {FFFFFF}You have changed animation.");
  661. format(string, sizeof(string), "{B0C4DE}ACTORS: Admin {FF0000}%s {FFFFFF}has edited actorid {FFFF00}%d{FFFFFF}'s Animation.", GetPlayerNameEx(playerid), actorid);
  662. Log("logs/acedit.log", string);
  663. }
  664. if(listitem == 8)
  665. {
  666. ApplyActorAnimation(actorid,"COP_AMBIENT","Copbrowse_nod",4.0,0,0,0,1,0);
  667. ActorsInfo[actorid][aAnim] = 9;
  668. SaveActors();
  669.  
  670. SendClientMessage(playerid, COLOR_WHITE, "{B0C4DE}ACTORS: {FFFFFF}You have changed animation.");
  671. format(string, sizeof(string), "{B0C4DE}ACTORS: Admin {FF0000}%s {FFFFFF}has edited actorid {FFFF00}%d{FFFFFF}'s Animation.", GetPlayerNameEx(playerid), actorid);
  672. Log("logs/acedit.log", string);
  673. }
  674. if(listitem == 9)
  675. {
  676. ApplyActorAnimation(actorid,"COP_AMBIENT","Copbrowse_out",4.0,0,0,0,1,0);
  677. ActorsInfo[actorid][aAnim] = 10;
  678. SaveActors();
  679.  
  680. SendClientMessage(playerid, COLOR_WHITE, "{B0C4DE}ACTORS: {FFFFFF}You have changed animation.");
  681. format(string, sizeof(string), "{B0C4DE}ACTORS: Admin {FF0000}%s {FFFFFF}has edited actorid {FFFF00}%d{FFFFFF}'s Animation.", GetPlayerNameEx(playerid), actorid);
  682. Log("logs/acedit.log", string);
  683. }
  684. if(listitem == 10)
  685. {
  686. ApplyActorAnimation(actorid,"COP_AMBIENT","Copbrowse_shake",4.0,0,0,0,1,0);
  687. ActorsInfo[actorid][aAnim] = 11;
  688. SaveActors();
  689.  
  690. SendClientMessage(playerid, COLOR_WHITE, "{B0C4DE}ACTORS: {FFFFFF}You have changed animation.");
  691. format(string, sizeof(string), "{B0C4DE}ACTORS: Admin {FF0000}%s {FFFFFF}has edited actorid {FFFF00}%d{FFFFFF}'s Animation.", GetPlayerNameEx(playerid), actorid);
  692. Log("logs/acedit.log", string);
  693. }
  694. if(listitem == 11)
  695. {
  696. ApplyActorAnimation(actorid,"COP_AMBIENT","Coplook_in",4.0,0,0,0,1,0);
  697. ActorsInfo[actorid][aAnim] = 12;
  698. SaveActors();
  699.  
  700. SendClientMessage(playerid, COLOR_WHITE, "{B0C4DE}ACTORS: {FFFFFF}You have changed animation.");
  701. format(string, sizeof(string), "{B0C4DE}ACTORS: Admin {FF0000}%s {FFFFFF}has edited actorid {FFFF00}%d{FFFFFF}'s Animation.", GetPlayerNameEx(playerid), actorid);
  702. Log("logs/acedit.log", string);
  703. }
  704. if(listitem == 12)
  705. {
  706. ApplyActorAnimation(actorid,"COP_AMBIENT","Coplook_loop",4.0,0,0,0,1,0);
  707. ActorsInfo[actorid][aAnim] = 13;
  708. SaveActors();
  709.  
  710. SendClientMessage(playerid, COLOR_WHITE, "{B0C4DE}ACTORS: {FFFFFF}You have changed animation.");
  711. format(string, sizeof(string), "{B0C4DE}ACTORS: Admin {FF0000}%s {FFFFFF}has edited actorid {FFFF00}%d{FFFFFF}'s Animation.", GetPlayerNameEx(playerid), actorid);
  712. Log("logs/acedit.log", string);
  713. }
  714. if(listitem == 13)
  715. {
  716. ApplyActorAnimation(actorid,"COP_AMBIENT","Coplook_nod",4.0,0,0,0,1,0);
  717. ActorsInfo[actorid][aAnim] = 14;
  718. SaveActors();
  719.  
  720. SendClientMessage(playerid, COLOR_WHITE, "{B0C4DE}ACTORS: {FFFFFF}You have changed animation.");
  721. format(string, sizeof(string), "{B0C4DE}ACTORS: Admin {FF0000}%s {FFFFFF}has edited actorid {FFFF00}%d{FFFFFF}'s Animation.", GetPlayerNameEx(playerid), actorid);
  722. Log("logs/acedit.log", string);
  723. }
  724. if(listitem == 14)
  725. {
  726. ApplyActorAnimation(actorid,"COP_AMBIENT","Coplook_out",4.0,0,0,0,1,0);
  727. ActorsInfo[actorid][aAnim] = 15;
  728. SaveActors();
  729.  
  730. SendClientMessage(playerid, COLOR_WHITE, "{B0C4DE}ACTORS: {FFFFFF}You have changed animation.");
  731. format(string, sizeof(string), "{B0C4DE}ACTORS: Admin {FF0000}%s {FFFFFF}has edited actorid {FFFF00}%d{FFFFFF}'s Animation.", GetPlayerNameEx(playerid), actorid);
  732. Log("logs/acedit.log", string);
  733. }
  734. if(listitem == 15)
  735. {
  736. ApplyActorAnimation(actorid,"COP_AMBIENT","Coplook_shake",4.0,0,0,0,1,0);
  737. ActorsInfo[actorid][aAnim] = 16;
  738. SaveActors();
  739.  
  740. SendClientMessage(playerid, COLOR_WHITE, "{B0C4DE}ACTORS: {FFFFFF}You have changed animation.");
  741. format(string, sizeof(string), "{B0C4DE}ACTORS: Admin {FF0000}%s {FFFFFF}has edited actorid {FFFF00}%d{FFFFFF}'s Animation.", GetPlayerNameEx(playerid), actorid);
  742. Log("logs/acedit.log", string);
  743. }
  744. if(listitem == 16)
  745. {
  746. ApplyActorAnimation(actorid,"COP_AMBIENT","Coplook_think",4.0,0,0,0,1,0);
  747. ActorsInfo[actorid][aAnim] = 17;
  748. SaveActors();
  749.  
  750. SendClientMessage(playerid, COLOR_WHITE, "{B0C4DE}ACTORS: {FFFFFF}You have changed animation.");
  751. format(string, sizeof(string), "{B0C4DE}ACTORS: Admin {FF0000}%s {FFFFFF}has edited actorid {FFFF00}%d{FFFFFF}'s Animation.", GetPlayerNameEx(playerid), actorid);
  752. Log("logs/acedit.log", string);
  753. }
  754. if(listitem == 17)
  755. {
  756. ApplyActorAnimation(actorid,"COP_AMBIENT","Coplook_watch",4.0,0,0,0,1,0);
  757. ActorsInfo[actorid][aAnim] = 18;
  758. SaveActors();
  759.  
  760. SendClientMessage(playerid, COLOR_WHITE, "{B0C4DE}ACTORS: {FFFFFF}You have changed animation.");
  761. format(string, sizeof(string), "{B0C4DE}ACTORS: Admin {FF0000}%s {FFFFFF}has edited actorid {FFFF00}%d{FFFFFF}'s Animation.", GetPlayerNameEx(playerid), actorid);
  762. Log("logs/acedit.log", string);
  763. }
  764. }
  765. }
  766. return 1;
  767. }
  768.  
  769. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  770. {
  771. return 1;
  772. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement