Advertisement
OtaconEvil

[FS] Editor 'a_actor' - v0.4 | By OTACON - [ENGLISH]

May 15th, 2015
1,077
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 83.78 KB | None | 0 0
  1. /*
  2.     * ## LEASE ATENTAMENTE PARA NO CONVERTIRSE EN LAMMER!!.: :D ##
  3.     *
  4.     * Estè Simple FILTERSCRIPT esta hecho especialmente para www.forum.sa-mp.com
  5.     * NO Publicar estè FILTERSCRIPT en Otros foros de SA-MP y hacerse pasar por el creador del CODE.
  6.     *
  7.     * Codigo Creado Por OTACON
  8.     *
  9.     * CREDITOS:
  10.     *     OTACON: Realizacion y Idea de creacion del code.
  11.     *     TÙ: Modificacion libremente respetando lo mencionado ;).
  12.     *
  13.     *    NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;)
  14.     *
  15.     *                Prohibido TOTALMENTE el Robo de Créditos o la
  16.     *                  Publicación de este FILTERSCRIPT sin Mi Permiso.
  17. */
  18. /*
  19.     * ## READ CAREFULLY TO AVOID BECOMING LAMMER!.: :D ##
  20.     *
  21.     * This simple FILTERSCRIPT is made especially for www.forum.sa-mp.com
  22.     * DO NOT Post the FILTERSCRIPT in Other SAMP forums and impersonating the creator of the CODE.
  23.     *
  24.     * Code Created By OTACON
  25.     *
  26.     * CREDITS:
  27.     *     OTACON: Idea Making and code creation.
  28.     *     YOUR: Modification freely respecting the above ;).
  29.     *
  30.     *    NOTE: Less Credits for those who criticize me.. JO'PUTAS! :D xD ;)
  31.     *
  32.     *                        FULLY spaces Theft Credit or
  33.     *                 Publication of this FILTERSCRIPT without my permission.
  34. */
  35.  
  36. /*
  37. [img]http://i.imgur.com/cQBWMoq.png[/img]
  38. [img]http://i.imgur.com/5GLYPtd.png[/img]
  39. [img]http://i.imgur.com/T5G5420.png[/img]
  40. [img]http://i.imgur.com/0Pw63AP.png[/img]
  41. */
  42.  
  43. #include <a_samp>
  44. #include <zcmd>
  45. #include <sscanf2>
  46.  
  47. #define DIALOG_ACTORS (17)
  48. enum e_actor{
  49.     objeto_select,
  50.     color_actor,
  51.     a_name[25],
  52.     a_skin,
  53.     c_actor,
  54.     bool:i_actor,
  55.     Float:h_actor,
  56.     a_animlib[32],
  57.     a_animname[32],
  58.     Text3D:label };
  59. new InfoActorEdicion[MAX_ACTORS][e_actor],
  60. cantidad_actores=0,
  61. cantidad_archivos=0,
  62. id_seleccionado=0,
  63. Float:vida_id=0.0,
  64. seleccion_skis=0,
  65. bool:actor_Invulnerable,
  66. bool:seleccionando_skins[MAX_PLAYERS][2],
  67. bool:creando_actors[MAX_PLAYERS],
  68. bool:tipo_archivo_a[MAX_PLAYERS],
  69. bool:seleccioando_actor[MAX_PLAYERS][2];
  70. static Float:old_actors[4], virtualword_actors;
  71.  
  72. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){
  73.  
  74.     new
  75.         Float:pos[4],
  76.         data[144];
  77.  
  78.     GetPlayerPos(playerid, pos[0],pos[1],pos[2]);
  79.     GetPlayerFacingAngle(playerid, pos[3]);
  80.  
  81.     if(newkeys & KEY_YES){
  82.         if(creando_actors[playerid]){
  83.             if(IsPlayerInAnyVehicle(playerid))
  84.                 return SendClientMessage(playerid,-1,"{919BA4}INFO: You can not use the editor of actors from a vehicle!.");
  85.             if(cantidad_actores>=MAX_ACTORS)
  86.                 return SendClientMessage(playerid,-1,"{919BA4}INFO: There are too many actors created so far!.");
  87.  
  88.             ShowPlayerDialog(playerid, DIALOG_ACTORS+1, DIALOG_STYLE_MSGBOX, "{FF6800}Editing system actors:", "\
  89.             {FFFFFF}¿That vulnerability want to apply the actor?", "vulnerable", "invulnerable");
  90.         }
  91.     }
  92.  
  93.     if(newkeys & KEY_NO){
  94.         if(creando_actors[playerid]){
  95.             if(IsPlayerInAnyVehicle(playerid))
  96.                 return SendClientMessage(playerid,-1,"{919BA4}INFO: You can not use the editor of actors from a vehicle!.");
  97.             if(cantidad_actores<=0)
  98.                 return SendClientMessage(playerid,-1,"{919BA4}INFO: there is not actor created so far!.");
  99.  
  100.             if(!IsValidActor(InfoActorEdicion[cantidad_actores][c_actor]))
  101.                 return false;
  102.             DestroyActor(InfoActorEdicion[cantidad_actores][c_actor]);
  103.             Delete3DTextLabel(InfoActorEdicion[cantidad_actores][label]);
  104.             InfoActorEdicion[cantidad_actores][a_skin] = 0;
  105.             InfoActorEdicion[cantidad_actores][c_actor] = 0;
  106.             InfoActorEdicion[cantidad_actores][i_actor] = false;
  107.             InfoActorEdicion[cantidad_actores][h_actor] = 0.0;
  108.             InfoActorEdicion[cantidad_actores][color_actor] = -1;
  109.             format(InfoActorEdicion[cantidad_actores][a_animlib],32,"%s","null");
  110.             format(InfoActorEdicion[cantidad_actores][a_animname],32,"%s","null");
  111.             format(InfoActorEdicion[cantidad_actores][a_name],24,"%s","Actor");
  112.             DestroyObject(InfoActorEdicion[cantidad_actores][objeto_select]);
  113.             cantidad_actores--;
  114.             format(data,sizeof(data),"{EEE019}INFO: You have successfully removed an actor!. actors created in total: [%d/%d].",cantidad_actores,MAX_ACTORS);
  115.             SendClientMessage(playerid,-1,data);
  116.         }
  117.     }
  118.  
  119.     if(newkeys & KEY_CROUCH && newkeys & KEY_SECONDARY_ATTACK){
  120.         if(creando_actors[playerid]){
  121.             if(IsPlayerInAnyVehicle(playerid))
  122.                 return SendClientMessage(playerid,-1,"{919BA4}INFO: You can not use the editor of actors from a vehicle!.");
  123.             if(cantidad_actores<=0)
  124.                 return SendClientMessage(playerid,-1,"{919BA4}INFO: there is not actor created so far!.");
  125.  
  126.             for(new xx=0; xx<cantidad_actores+1; xx++){
  127.                 if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
  128.                     continue;
  129.                 DestroyActor(InfoActorEdicion[xx][c_actor]);
  130.                 Delete3DTextLabel(InfoActorEdicion[xx][label]);
  131.                 InfoActorEdicion[xx][a_skin] = 0;
  132.                 InfoActorEdicion[xx][c_actor] = 0;
  133.                 InfoActorEdicion[xx][i_actor] = false;
  134.                 InfoActorEdicion[xx][h_actor] = 0.0;
  135.                 InfoActorEdicion[xx][color_actor] = -1;
  136.                 format(InfoActorEdicion[xx][a_animlib],32,"%s","null");
  137.                 format(InfoActorEdicion[xx][a_animname],32,"%s","null");
  138.                 format(InfoActorEdicion[xx][a_name],24,"%s","Actor");
  139.                 DestroyObject(InfoActorEdicion[xx][objeto_select]);
  140.             }
  141.             cantidad_actores=0;
  142.             format(data,sizeof(data),"{EEE019}INFO: They have eliminated all the actors properly!. actors created in total: [%d/%d].",cantidad_actores,MAX_ACTORS);
  143.             SendClientMessage(playerid,-1,data);
  144.         }
  145.     }
  146.  
  147.     if(newkeys & KEY_CROUCH && newkeys & KEY_SPRINT){
  148.         if(creando_actors[playerid]){
  149.             if(IsPlayerInAnyVehicle(playerid))
  150.                 return SendClientMessage(playerid,-1,"{919BA4}INFO: You can not use the editor of actors from a vehicle!.");
  151.             if(cantidad_actores<=0)
  152.                 return SendClientMessage(playerid,-1,"{919BA4}INFO: there is not actor created so far!.");
  153.  
  154.             ShowPlayerDialog(playerid, DIALOG_ACTORS+16, DIALOG_STYLE_MSGBOX, "{FF6800}Editing system actors:", "\
  155.             {FFFFFF}choose the file type you want to save the actors:", "normal", "filterscript");
  156.         }
  157.     }
  158.  
  159.     if(newkeys & KEY_CROUCH && newkeys & KEY_CTRL_BACK)
  160.         CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorhelp");
  161.  
  162.     return true;
  163. }
  164.  
  165. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){
  166.  
  167.     new
  168.         animlib[32],
  169.         animname[32],
  170.         Float:pos[4],
  171.         data[300],
  172.         datos[144],
  173.         File:archivos,
  174.         Float:health,
  175.         virtualword;
  176.  
  177.     GetPlayerPos(playerid, pos[0],pos[1],pos[2]);
  178.     GetPlayerFacingAngle(playerid, pos[3]);
  179.     virtualword = GetPlayerVirtualWorld(playerid);
  180.  
  181.     switch(dialogid){
  182.  
  183.         case DIALOG_ACTORS+0:{
  184.             if(!response)
  185.                 CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  186.         }
  187.         case DIALOG_ACTORS+1:{
  188.             if(response){
  189.                 actor_Invulnerable = false;
  190.                 ShowPlayerDialog(playerid, DIALOG_ACTORS+2, DIALOG_STYLE_MSGBOX, "{FF6800}Editing system actors:", "\
  191.                 {FFFFFF}¿Choice of life that you want to apply to the actor?", "personalize", "by default");
  192.             }else{
  193.                 actor_Invulnerable = true;
  194.                 ShowPlayerDialog(playerid, DIALOG_ACTORS+2, DIALOG_STYLE_MSGBOX, "{FF6800}Editing system actors:", "\
  195.                 {FFFFFF}¿Choice of life that you want to apply to the actor?", "personalize", "by default");
  196.             }
  197.         }
  198.  
  199.         case DIALOG_ACTORS+2:{
  200.             if(response){
  201.                 ShowPlayerDialog(playerid, DIALOG_ACTORS+3, DIALOG_STYLE_INPUT, "{FF6800}Editing system actors:", "\
  202.                 {FFFFFF}enter the amount of life that has the actor, must be greater than 0 and less than or equal to 100.\n\
  203.                 {A50000}NOTE: You can use the 'default' to be applied automatically 100. ", "accept", "by default");
  204.             }else{
  205.                 vida_id = 100.0;
  206.                 ShowPlayerDialog(playerid, DIALOG_ACTORS+7, DIALOG_STYLE_MSGBOX, "{FF6800}Editing system actors:", "\
  207.                 {FFFFFF}¿Choice of skin that you want to apply to the actor?", "personalize", "by default");
  208.             }
  209.         }
  210.  
  211.         case DIALOG_ACTORS+3:{
  212.             if(response){
  213.                 new Float:valor;
  214.                 if(!sscanf(inputtext, "f", valor)){
  215.                     if(valor>=0 && valor<=100){
  216.                         vida_id = valor;
  217.                         ShowPlayerDialog(playerid, DIALOG_ACTORS+7, DIALOG_STYLE_MSGBOX, "{FF6800}Editing system actors:", "\
  218.                         {FFFFFF}¿Choice of skin that you want to apply to the actor?", "personalize", "by default");
  219.                     }else{
  220.                         ShowPlayerDialog(playerid, DIALOG_ACTORS+3, DIALOG_STYLE_INPUT, "{FF6800}Editing system actors:", "\
  221.                         {FFFFFF}enter the amount of life that has the actor, must be greater than 0 and less than or equal to 100.\n\
  222.                         {A50000}NOTE: You can use the 'default' to be applied automatically 100. ", "accept", "by default");
  223.                     }
  224.                 }else{
  225.                     ShowPlayerDialog(playerid, DIALOG_ACTORS+3, DIALOG_STYLE_INPUT, "{FF6800}Editing system actors:", "\
  226.                     {FFFFFF}enter the amount of life that has the actor, must be greater than 0 and less than or equal to 100.\n\
  227.                     {A50000}NOTE: You can use the 'default' to be applied automatically 100. ", "accept", "by default");
  228.                 }
  229.             }else{
  230.                 vida_id = 100.0;
  231.                 ShowPlayerDialog(playerid, DIALOG_ACTORS+7, DIALOG_STYLE_MSGBOX, "{FF6800}Editing system actors:", "\
  232.                 {FFFFFF}¿Choice of skin that you want to apply to the actor?", "personalize", "by default");
  233.             }
  234.         }
  235.  
  236.         case DIALOG_ACTORS+4:{
  237.             if(response){
  238.                 new opcion[100];
  239.  
  240.                 if(!sscanf(inputtext, "s[100]", opcion)){
  241.                     format(data,sizeof(data),"%s.%s",opcion, (tipo_archivo_a[playerid])?("txt"):("pwn") );
  242.                     if(fexist(data))fremove(data);
  243.                     archivos=fopen(data, io_readwrite);
  244.                     if(archivos){
  245.  
  246.                         if(tipo_archivo_a[playerid]){
  247.                             fwrite(archivos, "\r\n/**** Editing system actors - By OTACON ****/\r\n");
  248.                             format(datos,sizeof(datos),"    new actorid[%d];\r\n", cantidad_actores+1);
  249.                             fwrite(archivos, datos);
  250.                             format(datos,sizeof(datos),"    new Text3D:text_actor[%d];\r\n\r\n\r\n", cantidad_actores+1);
  251.                             fwrite(archivos, datos);
  252.                             for(new xx=1; xx<cantidad_actores+1; xx++){
  253.                                 if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
  254.                                     continue;
  255.                                 GetActorPos(InfoActorEdicion[xx][c_actor], pos[0],pos[1],pos[2]);
  256.                                 GetActorFacingAngle(InfoActorEdicion[xx][c_actor], pos[3]);
  257.                                 format(datos,sizeof(datos),"    actorid[%d] = CreateActor(%d, %f,%f,%f,%f);\r\n\r\n", xx,InfoActorEdicion[xx][a_skin],pos[0],pos[1],pos[2],pos[3]);
  258.                                 fwrite(archivos, datos);
  259.                             }
  260.                             fwrite(archivos, "\r\n  new data[144];\r\n");
  261.                             for(new xx=1; xx<cantidad_actores+1; xx++){
  262.                                 if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
  263.                                     continue;
  264.                                 GetActorPos(InfoActorEdicion[xx][c_actor], pos[0],pos[1],pos[2]);
  265.                                 virtualword = GetActorVirtualWorld(playerid);
  266.                                 format(datos,sizeof(datos),"    text_actor[%d] = Create3DTextLabel(\"_\",-1,%f,%f,%f,10,%d,0);\r\n",xx,pos[1],pos[2],pos[3]+1,virtualword);
  267.                                 fwrite(archivos, datos);
  268.                                 format(datos,sizeof(datos),"    format(data,sizeof(data),\"%s:%s\",actorid[%d]);\r\n",InfoActorEdicion[xx][a_name],"(id:%d)",xx);
  269.                                 fwrite(archivos, datos);
  270.                                 format(datos,sizeof(datos),"    Update3DTextLabelText(text_actor[%d],0x%08x,data);\r\n\r\n",xx,InfoActorEdicion[xx][color_actor]);
  271.                                 fwrite(archivos, datos);
  272.                             }
  273.                             for(new xx=1; xx<cantidad_actores+1; xx++){
  274.                                 if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
  275.                                     continue;
  276.                                 GetActorFacingAngle(InfoActorEdicion[xx][c_actor], pos[3]);
  277.                                 virtualword = GetActorVirtualWorld(playerid);
  278.                                 GetActorHealth(InfoActorEdicion[xx][c_actor], health);
  279.                                 format(datos,sizeof(datos),"    SetActorFacingAngle(actorid[%d], %f);\r\n", xx,pos[3]);
  280.                                 fwrite(archivos, datos);
  281.                                 format(datos,sizeof(datos),"    SetActorVirtualWorld(actorid[%d], %d);\r\n", xx,virtualword);
  282.                                 fwrite(archivos, datos);
  283.                                 format(datos,sizeof(datos),"    SetActorInvulnerable(actorid[%d], %s);\r\n", xx, (!InfoActorEdicion[xx][i_actor])?("false"):("true") );
  284.                                 fwrite(archivos, datos);
  285.                                 format(datos,sizeof(datos),"    SetActorHealth(actorid[%d], %f);\r\n", xx,InfoActorEdicion[xx][h_actor]);
  286.                                 fwrite(archivos, datos);
  287.                                 format(datos,sizeof(datos),"    ApplyActorAnimation(actorid[%d], \"%s\", \"%s\", 4.1, 1, 1, 1, 1, 1);\r\n", xx, InfoActorEdicion[xx][a_animlib],InfoActorEdicion[xx][a_animname]);
  288.                                 fwrite(archivos, datos);
  289.                                 fwrite(archivos, "  // NOTE: changing the settings: (Float:fDelta, loop, lockx, locky, freeze, time) \r\n");
  290.                                 fwrite(archivos, "  // https://wiki.sa-mp.com/wiki/ApplyActorAnimation \r\n\r\n");
  291.                             }
  292.                             fwrite(archivos, "\r\n/*  * MORE FEATURES...: \r\n\r\n");
  293.                             fwrite(archivos, "      GetActorPos                 => https://wiki.sa-mp.com/wiki/GetActorPos \r\n");
  294.                             fwrite(archivos, "      GetActorVirtualWorld        => https://wiki.sa-mp.com/wiki/GetActorVirtualWorld \r\n");
  295.                             fwrite(archivos, "      GetPlayerTargetActor        => https://wiki.sa-mp.com/wiki/GetPlayerTargetActor \r\n");
  296.                             fwrite(archivos, "      IsActorInvulnerable         => https://wiki.sa-mp.com/wiki/IsActorInvulnerable \r\n");
  297.                             fwrite(archivos, "      IsActorStreamedIn           => https://wiki.sa-mp.com/wiki/IsActorStreamedIn \r\n");
  298.                             fwrite(archivos, "      IsValidActor                => https://wiki.sa-mp.com/wiki/IsValidActor \r\n");
  299.                             fwrite(archivos, "      OnActorStreamIn             => https://wiki.sa-mp.com/wiki/OnActorStreamIn \r\n");
  300.                             fwrite(archivos, "      OnActorStreamOut            => https://wiki.sa-mp.com/wiki/OnActorStreamOut \r\n");
  301.                             fwrite(archivos, "      OnPlayerGiveDamageActor     => https://wiki.sa-mp.com/wiki/OnPlayerGiveDamageActor \r\n");
  302.                             fwrite(archivos, "      SetActorFacingAngle         => https://wiki.sa-mp.com/wiki/SetActorFacingAngle \r\n");
  303.                             fwrite(archivos, "      SetActorHealth              => https://wiki.sa-mp.com/wiki/SetActorHealth \r\n");
  304.                             fwrite(archivos, "      SetActorInvulnerable        => https://wiki.sa-mp.com/wiki/SetActorInvulnerable \r\n");
  305.                             fwrite(archivos, "      SetActorPos                 => https://wiki.sa-mp.com/wiki/SetActorPos \r\n");
  306.                             fwrite(archivos, "      SetActorVirtualWorld        => https://wiki.sa-mp.com/wiki/SetActorVirtualWorld \r\n");
  307.                             fwrite(archivos, "      ApplyActorAnimation         => https://wiki.sa-mp.com/wiki/ApplyActorAnimation \r\n");
  308.                             fwrite(archivos, "      ClearActorAnimations        => https://wiki.sa-mp.com/wiki/ClearActorAnimations \r\n");
  309.                             fwrite(archivos, "      CreateActor                 => https://wiki.sa-mp.com/wiki/CreateActor \r\n");
  310.                             fwrite(archivos, "      DestroyActor                => https://wiki.sa-mp.com/wiki/DestroyActor \r\n");
  311.                             fwrite(archivos, "      GetActorFacingAngle         => https://wiki.sa-mp.com/wiki/GetActorFacingAngle \r\n");
  312.                             fwrite(archivos, "      GetActorHealth              => https://wiki.sa-mp.com/wiki/GetActorHealth \r\n");
  313.                             fwrite(archivos, "      GetActorPoolSize            => https://wiki.sa-mp.com/wiki/GetActorPoolSize \r\n\r\n");
  314.                             fwrite(archivos, "*/ \r\n\r\n");
  315.                             fwrite(archivos, "/**** Editing system actors - By OTACON ****/\r\n\r\n");
  316.                             fclose(archivos);
  317.                         }else{
  318.                             fwrite(archivos, "\r\n/**** Editing system actors - By OTACON ****/\r\n");
  319.                             fwrite(archivos, "#include <a_samp>\r\n\r\n");
  320.                             format(datos,sizeof(datos),"new actorid[%d];\r\n", cantidad_actores+1);
  321.                             fwrite(archivos, datos);
  322.                             format(datos,sizeof(datos),"new Text3D:text_actor[%d];\r\n\r\n", cantidad_actores+1);
  323.                             fwrite(archivos, datos);
  324.                             fwrite(archivos, "public OnFilterScriptInit(){\r\n\r\n");
  325.                             for(new xx=1; xx<cantidad_actores+1; xx++){
  326.                                 if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
  327.                                     continue;
  328.                                 GetActorPos(InfoActorEdicion[xx][c_actor], pos[0],pos[1],pos[2]);
  329.                                 GetActorFacingAngle(InfoActorEdicion[xx][c_actor], pos[3]);
  330.                                 format(datos,sizeof(datos),"    actorid[%d] = CreateActor(%d, %f,%f,%f,%f);\r\n", xx,InfoActorEdicion[xx][a_skin],pos[0],pos[1],pos[2],pos[3]);
  331.                                 fwrite(archivos, datos);
  332.                             }
  333.                             fwrite(archivos, "\r\n  new data[144];\r\n");
  334.                             for(new xx=1; xx<cantidad_actores+1; xx++){
  335.                                 if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
  336.                                     continue;
  337.                                 GetActorPos(InfoActorEdicion[xx][c_actor], pos[0],pos[1],pos[2]);
  338.                                 virtualword = GetActorVirtualWorld(playerid);
  339.                                 format(datos,sizeof(datos),"    text_actor[%d] = Create3DTextLabel(\"_\",-1,%f,%f,%f,10,%d,0);\r\n",xx,pos[1],pos[2],pos[3]+1,virtualword);
  340.                                 fwrite(archivos, datos);
  341.                                 format(datos,sizeof(datos),"    format(data,sizeof(data),\"%s:%s\",actorid[%d]);\r\n",InfoActorEdicion[xx][a_name],"(id:%d)",xx);
  342.                                 fwrite(archivos, datos);
  343.                                 format(datos,sizeof(datos),"    Update3DTextLabelText(text_actor[%d],0x%08x,data);\r\n\r\n",xx,InfoActorEdicion[xx][color_actor]);
  344.                                 fwrite(archivos, datos);
  345.                             }
  346.                             for(new xx=1; xx<cantidad_actores+1; xx++){
  347.                                 if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
  348.                                     continue;
  349.                                 GetActorFacingAngle(InfoActorEdicion[xx][c_actor], pos[3]);
  350.                                 virtualword = GetActorVirtualWorld(playerid);
  351.                                 GetActorHealth(InfoActorEdicion[xx][c_actor], health);
  352.                                 format(datos,sizeof(datos),"    SetActorFacingAngle(actorid[%d], %f);\r\n", xx,pos[3]);
  353.                                 fwrite(archivos, datos);
  354.                                 format(datos,sizeof(datos),"    SetActorVirtualWorld(actorid[%d], %d);\r\n", xx,virtualword);
  355.                                 fwrite(archivos, datos);
  356.                                 format(datos,sizeof(datos),"    SetActorInvulnerable(actorid[%d], %s);\r\n", xx, (!InfoActorEdicion[xx][i_actor])?("false"):("true") );
  357.                                 fwrite(archivos, datos);
  358.                                 format(datos,sizeof(datos),"    SetActorHealth(actorid[%d], %f);\r\n", xx,InfoActorEdicion[xx][h_actor]);
  359.                                 fwrite(archivos, datos);
  360.                                 format(datos,sizeof(datos),"    ApplyActorAnimation(actorid[%d], \"%s\", \"%s\", 4.1, 1, 1, 1, 1, 1);\r\n", xx, InfoActorEdicion[xx][a_animlib],InfoActorEdicion[xx][a_animname]);
  361.                                 fwrite(archivos, datos);
  362.                                 fwrite(archivos, "  // NOTE: changing the settings: (Float:fDelta, loop, lockx, locky, freeze, time) \r\n");
  363.                                 fwrite(archivos, "  // https://wiki.sa-mp.com/wiki/ApplyActorAnimation \r\n\r\n");
  364.                             }
  365.                             fwrite(archivos, "  return true;\r\n");
  366.                             fwrite(archivos, "}\r\n\r\n");
  367.                             fwrite(archivos, "public OnPlayerGiveDamageActor(playerid, damaged_actorid, Float: amount, weaponid, bodypart){\r\n\r\n");
  368.                             fwrite(archivos, "    new\r\n");
  369.                             fwrite(archivos, "      Float:health;\r\n");
  370.                             fwrite(archivos, "    GetActorHealth(actorid[damaged_actorid], health);\r\n");
  371.                             fwrite(archivos, "  if(IsValidActor(actorid[damaged_actorid])){\r\n");
  372.                             fwrite(archivos, "      if(!IsActorInvulnerable(actorid[damaged_actorid])){\r\n");
  373.                             fwrite(archivos, "          SetActorHealth(actorid[damaged_actorid], (health-amount));\r\n");
  374.                             fwrite(archivos, "          if(health<=0.0){\r\n");
  375.                             fwrite(archivos, "              SetActorHealth(actorid[damaged_actorid], 100.0);\r\n");
  376.                             fwrite(archivos, "          }\r\n");
  377.                             fwrite(archivos, "      }\r\n");
  378.                             fwrite(archivos, "  }\r\n\r\n");
  379.                             fwrite(archivos, "  return true;\r\n");
  380.                             fwrite(archivos, "}\r\n\r\n");
  381.                             fwrite(archivos, "/*  * MORE FEATURES...: \r\n\r\n");
  382.                             fwrite(archivos, "      GetActorPos                 => https://wiki.sa-mp.com/wiki/GetActorPos \r\n");
  383.                             fwrite(archivos, "      GetActorVirtualWorld        => https://wiki.sa-mp.com/wiki/GetActorVirtualWorld \r\n");
  384.                             fwrite(archivos, "      GetPlayerTargetActor        => https://wiki.sa-mp.com/wiki/GetPlayerTargetActor \r\n");
  385.                             fwrite(archivos, "      IsActorInvulnerable         => https://wiki.sa-mp.com/wiki/IsActorInvulnerable \r\n");
  386.                             fwrite(archivos, "      IsActorStreamedIn           => https://wiki.sa-mp.com/wiki/IsActorStreamedIn \r\n");
  387.                             fwrite(archivos, "      IsValidActor                => https://wiki.sa-mp.com/wiki/IsValidActor \r\n");
  388.                             fwrite(archivos, "      OnActorStreamIn             => https://wiki.sa-mp.com/wiki/OnActorStreamIn \r\n");
  389.                             fwrite(archivos, "      OnActorStreamOut            => https://wiki.sa-mp.com/wiki/OnActorStreamOut \r\n");
  390.                             fwrite(archivos, "      OnPlayerGiveDamageActor     => https://wiki.sa-mp.com/wiki/OnPlayerGiveDamageActor \r\n");
  391.                             fwrite(archivos, "      SetActorFacingAngle         => https://wiki.sa-mp.com/wiki/SetActorFacingAngle \r\n");
  392.                             fwrite(archivos, "      SetActorHealth              => https://wiki.sa-mp.com/wiki/SetActorHealth \r\n");
  393.                             fwrite(archivos, "      SetActorInvulnerable        => https://wiki.sa-mp.com/wiki/SetActorInvulnerable \r\n");
  394.                             fwrite(archivos, "      SetActorPos                 => https://wiki.sa-mp.com/wiki/SetActorPos \r\n");
  395.                             fwrite(archivos, "      SetActorVirtualWorld        => https://wiki.sa-mp.com/wiki/SetActorVirtualWorld \r\n");
  396.                             fwrite(archivos, "      ApplyActorAnimation         => https://wiki.sa-mp.com/wiki/ApplyActorAnimation \r\n");
  397.                             fwrite(archivos, "      ClearActorAnimations        => https://wiki.sa-mp.com/wiki/ClearActorAnimations \r\n");
  398.                             fwrite(archivos, "      CreateActor                 => https://wiki.sa-mp.com/wiki/CreateActor \r\n");
  399.                             fwrite(archivos, "      DestroyActor                => https://wiki.sa-mp.com/wiki/DestroyActor \r\n");
  400.                             fwrite(archivos, "      GetActorFacingAngle         => https://wiki.sa-mp.com/wiki/GetActorFacingAngle \r\n");
  401.                             fwrite(archivos, "      GetActorHealth              => https://wiki.sa-mp.com/wiki/GetActorHealth \r\n");
  402.                             fwrite(archivos, "      GetActorPoolSize            => https://wiki.sa-mp.com/wiki/GetActorPoolSize \r\n\r\n");
  403.                             fwrite(archivos, "*/ \r\n\r\n");
  404.                             fwrite(archivos, "/**** Editing system actors - By OTACON ****/\r\n\r\n");
  405.                             fclose(archivos);
  406.                         }
  407.  
  408.                         format(data,sizeof(data),"{005BA1}INFO: haz guardado todos los actores correctamente!. actors created in total: [%d/%d].",cantidad_actores,MAX_ACTORS);
  409.                         SendClientMessage(playerid,-1,data);
  410.                         format(data,sizeof(data),"{005BA1}INFO: all players have been saved in the file: '%s.txt', en 'scriptfiles'.",opcion);
  411.                         SendClientMessage(playerid,-1,data);
  412.                         SendClientMessage(playerid,-1,"{EEE019}INFO: the editor is restarted, all the players have been eliminated!.");
  413.                         for(new xx=1; xx<cantidad_actores+1; xx++){
  414.                             if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
  415.                                 continue;
  416.                             DestroyActor(InfoActorEdicion[xx][c_actor]);
  417.                             Delete3DTextLabel(InfoActorEdicion[xx][label]);
  418.                             InfoActorEdicion[xx][a_skin] = 0;
  419.                             InfoActorEdicion[xx][c_actor] = 0;
  420.                             InfoActorEdicion[xx][i_actor] = false;
  421.                             InfoActorEdicion[xx][h_actor] = 0.0;
  422.                             InfoActorEdicion[xx][color_actor] = -1;
  423.                             format(InfoActorEdicion[xx][a_animlib],32,"%s","null");
  424.                             format(InfoActorEdicion[xx][a_animname],32,"%s","null");
  425.                             format(InfoActorEdicion[xx][a_name],24,"%s","Actor");
  426.                             DestroyObject(InfoActorEdicion[xx][objeto_select]);
  427.                         }
  428.                         cantidad_actores=0;
  429.                     }
  430.                 }else{
  431.                     ShowPlayerDialog(playerid, DIALOG_ACTORS+4, DIALOG_STYLE_INPUT, "{FF6800}Editing system actors:", "\
  432.                     {FFFFFF}type a name for the file that stores the actors created.\n\
  433.                     {A50000}NOTE: You can use the 'default' to be applied\n\
  434.                     the name {FFFFFF}'actors.0001' {A50000}(by counting the number will file created). ", "accept", "by default");
  435.                 }
  436.             }else{
  437.                 format(data,sizeof(data),"actors.%04d.%s",cantidad_archivos, (tipo_archivo_a[playerid])?("txt"):("pwn") );
  438.                 if(fexist(data))fremove(data);
  439.                 archivos=fopen(data, io_readwrite);
  440.                 if(archivos){
  441.  
  442.                     if(tipo_archivo_a[playerid]){
  443.                         fwrite(archivos, "\r\n/**** Editing system actors - By OTACON ****/\r\n");
  444.                         format(datos,sizeof(datos),"    new actorid[%d];\r\n", cantidad_actores+1);
  445.                         fwrite(archivos, datos);
  446.                         format(datos,sizeof(datos),"    new Text3D:text_actor[%d];\r\n\r\n", cantidad_actores+1);
  447.                         fwrite(archivos, datos);
  448.                         for(new xx=1; xx<cantidad_actores+1; xx++){
  449.                             if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
  450.                                 continue;
  451.                             GetActorPos(InfoActorEdicion[xx][c_actor], pos[0],pos[1],pos[2]);
  452.                             GetActorFacingAngle(InfoActorEdicion[xx][c_actor], pos[3]);
  453.                             format(datos,sizeof(datos),"    actorid[%d] = CreateActor(%d, %f,%f,%f,%f);\r\n", xx,InfoActorEdicion[xx][a_skin],pos[0],pos[1],pos[2],pos[3]);
  454.                             fwrite(archivos, datos);
  455.                         }
  456.                         fwrite(archivos, "\r\n  new data[144];\r\n");
  457.                         for(new xx=1; xx<cantidad_actores+1; xx++){
  458.                             if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
  459.                                 continue;
  460.                             GetActorPos(InfoActorEdicion[xx][c_actor], pos[0],pos[1],pos[2]);
  461.                             virtualword = GetActorVirtualWorld(playerid);
  462.                             format(datos,sizeof(datos),"    text_actor[%d] = Create3DTextLabel(\"_\",-1,%f,%f,%f,10,%d,0);\r\n",xx,pos[1],pos[2],pos[3]+1,virtualword);
  463.                             fwrite(archivos, datos);
  464.                             format(datos,sizeof(datos),"    format(data,sizeof(data),\"%s:%s\",actorid[%d]);\r\n",InfoActorEdicion[xx][a_name],"(id:%d)",xx);
  465.                             fwrite(archivos, datos);
  466.                             format(datos,sizeof(datos),"    Update3DTextLabelText(text_actor[%d],0x%08x,data);\r\n\r\n",xx,InfoActorEdicion[xx][color_actor]);
  467.                             fwrite(archivos, datos);
  468.                         }
  469.                         for(new xx=1; xx<cantidad_actores+1; xx++){
  470.                             if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
  471.                                 continue;
  472.                             GetActorFacingAngle(InfoActorEdicion[xx][c_actor], pos[3]);
  473.                             virtualword = GetActorVirtualWorld(playerid);
  474.                             GetActorHealth(InfoActorEdicion[xx][c_actor], health);
  475.                             format(datos,sizeof(datos),"    SetActorFacingAngle(actorid[%d], %f);\r\n", xx,pos[3]);
  476.                             fwrite(archivos, datos);
  477.                             format(datos,sizeof(datos),"    SetActorVirtualWorld(actorid[%d], %d);\r\n", xx,virtualword);
  478.                             fwrite(archivos, datos);
  479.                             format(datos,sizeof(datos),"    SetActorInvulnerable(actorid[%d], %s);\r\n", xx, (!InfoActorEdicion[xx][i_actor])?("false"):("true") );
  480.                             fwrite(archivos, datos);
  481.                             format(datos,sizeof(datos),"    SetActorHealth(actorid[%d], %f);\r\n", xx,InfoActorEdicion[xx][h_actor]);
  482.                             fwrite(archivos, datos);
  483.                             format(datos,sizeof(datos),"    ApplyActorAnimation(actorid[%d], \"%s\", \"%s\" 4.1, 1, 1, 1, 1, 1);\r\n", xx, InfoActorEdicion[xx][a_animlib],InfoActorEdicion[xx][a_animname]);
  484.                             fwrite(archivos, datos);
  485.                             fwrite(archivos, "  // NOTE: changing the settings: (Float:fDelta, loop, lockx, locky, freeze, time) \r\n");
  486.                             fwrite(archivos, "  // https://wiki.sa-mp.com/wiki/ApplyActorAnimation \r\n\r\n");
  487.                         }
  488.                         fwrite(archivos, "\r\n/*  * MORE FEATURES...: \r\n\r\n");
  489.                         fwrite(archivos, "      GetActorPos                 => https://wiki.sa-mp.com/wiki/GetActorPos \r\n");
  490.                         fwrite(archivos, "      GetActorVirtualWorld        => https://wiki.sa-mp.com/wiki/GetActorVirtualWorld \r\n");
  491.                         fwrite(archivos, "      GetPlayerTargetActor        => https://wiki.sa-mp.com/wiki/GetPlayerTargetActor \r\n");
  492.                         fwrite(archivos, "      IsActorInvulnerable         => https://wiki.sa-mp.com/wiki/IsActorInvulnerable \r\n");
  493.                         fwrite(archivos, "      IsActorStreamedIn           => https://wiki.sa-mp.com/wiki/IsActorStreamedIn \r\n");
  494.                         fwrite(archivos, "      IsValidActor                => https://wiki.sa-mp.com/wiki/IsValidActor \r\n");
  495.                         fwrite(archivos, "      OnActorStreamIn             => https://wiki.sa-mp.com/wiki/OnActorStreamIn \r\n");
  496.                         fwrite(archivos, "      OnActorStreamOut            => https://wiki.sa-mp.com/wiki/OnActorStreamOut \r\n");
  497.                         fwrite(archivos, "      OnPlayerGiveDamageActor     => https://wiki.sa-mp.com/wiki/OnPlayerGiveDamageActor \r\n");
  498.                         fwrite(archivos, "      SetActorFacingAngle         => https://wiki.sa-mp.com/wiki/SetActorFacingAngle \r\n");
  499.                         fwrite(archivos, "      SetActorHealth              => https://wiki.sa-mp.com/wiki/SetActorHealth \r\n");
  500.                         fwrite(archivos, "      SetActorInvulnerable        => https://wiki.sa-mp.com/wiki/SetActorInvulnerable \r\n");
  501.                         fwrite(archivos, "      SetActorPos                 => https://wiki.sa-mp.com/wiki/SetActorPos \r\n");
  502.                         fwrite(archivos, "      SetActorVirtualWorld        => https://wiki.sa-mp.com/wiki/SetActorVirtualWorld \r\n");
  503.                         fwrite(archivos, "      ApplyActorAnimation         => https://wiki.sa-mp.com/wiki/ApplyActorAnimation \r\n");
  504.                         fwrite(archivos, "      ClearActorAnimations        => https://wiki.sa-mp.com/wiki/ClearActorAnimations \r\n");
  505.                         fwrite(archivos, "      CreateActor                 => https://wiki.sa-mp.com/wiki/CreateActor \r\n");
  506.                         fwrite(archivos, "      DestroyActor                => https://wiki.sa-mp.com/wiki/DestroyActor \r\n");
  507.                         fwrite(archivos, "      GetActorFacingAngle         => https://wiki.sa-mp.com/wiki/GetActorFacingAngle \r\n");
  508.                         fwrite(archivos, "      GetActorHealth              => https://wiki.sa-mp.com/wiki/GetActorHealth \r\n");
  509.                         fwrite(archivos, "      GetActorPoolSize            => https://wiki.sa-mp.com/wiki/GetActorPoolSize \r\n\r\n");
  510.                         fwrite(archivos, "*/ \r\n\r\n");
  511.                         fwrite(archivos, "/**** Editing system actors - By OTACON ****/\r\n\r\n");
  512.                         fclose(archivos);
  513.                     }else{
  514.                         fwrite(archivos, "\r\n/**** Editing system actors - By OTACON ****/\r\n");
  515.                         fwrite(archivos, "#include <a_samp>\r\n\r\n");
  516.                         format(datos,sizeof(datos),"new actorid[%d];\r\n", cantidad_actores+1);
  517.                         fwrite(archivos, datos);
  518.                         format(datos,sizeof(datos),"new Text3D:text_actor[%d];\r\n\r\n", cantidad_actores+1);
  519.                         fwrite(archivos, datos);
  520.                         fwrite(archivos, "public OnFilterScriptInit(){\r\n\r\n");
  521.                         for(new xx=1; xx<cantidad_actores+1; xx++){
  522.                             if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
  523.                                 continue;
  524.                             GetActorPos(InfoActorEdicion[xx][c_actor], pos[0],pos[1],pos[2]);
  525.                             GetActorFacingAngle(InfoActorEdicion[xx][c_actor], pos[3]);
  526.                             format(datos,sizeof(datos),"    actorid[%d] = CreateActor(%d, %f,%f,%f,%f);\r\n", xx,InfoActorEdicion[xx][a_skin],pos[0],pos[1],pos[2],pos[3]);
  527.                             fwrite(archivos, datos);
  528.                         }
  529.                         fwrite(archivos, "\r\n  new data[144];\r\n");
  530.                         for(new xx=1; xx<cantidad_actores+1; xx++){
  531.                             if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
  532.                                 continue;
  533.                             GetActorPos(InfoActorEdicion[xx][c_actor], pos[0],pos[1],pos[2]);
  534.                             virtualword = GetActorVirtualWorld(playerid);
  535.                             format(datos,sizeof(datos),"    text_actor[%d] = Create3DTextLabel(\"_\",-1,%f,%f,%f,10,%d,0);\r\n",xx,pos[1],pos[2],pos[3]+1,virtualword);
  536.                             fwrite(archivos, datos);
  537.                             format(datos,sizeof(datos),"    format(data,sizeof(data),\"%s:%s\",actorid[%d]);\r\n",InfoActorEdicion[xx][a_name],"(id:%d)",xx);
  538.                             fwrite(archivos, datos);
  539.                             format(datos,sizeof(datos),"    Update3DTextLabelText(text_actor[%d],0x%08x,data);\r\n\r\n",xx,InfoActorEdicion[xx][color_actor]);
  540.                             fwrite(archivos, datos);
  541.                         }
  542.                         for(new xx=1; xx<cantidad_actores+1; xx++){
  543.                             if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
  544.                                 continue;
  545.                             GetActorFacingAngle(InfoActorEdicion[xx][c_actor], pos[3]);
  546.                             virtualword = GetActorVirtualWorld(playerid);
  547.                             GetActorHealth(InfoActorEdicion[xx][c_actor], health);
  548.                             format(datos,sizeof(datos),"    SetActorFacingAngle(actorid[%d], %f);\r\n", xx,pos[3]);
  549.                             fwrite(archivos, datos);
  550.                             format(datos,sizeof(datos),"    SetActorVirtualWorld(actorid[%d], %d);\r\n", xx,virtualword);
  551.                             fwrite(archivos, datos);
  552.                             format(datos,sizeof(datos),"    SetActorInvulnerable(actorid[%d], %s);\r\n", xx, (!InfoActorEdicion[xx][i_actor])?("false"):("true") );
  553.                             fwrite(archivos, datos);
  554.                             format(datos,sizeof(datos),"    SetActorHealth(actorid[%d], %f);\r\n", xx,InfoActorEdicion[xx][h_actor]);
  555.                             fwrite(archivos, datos);
  556.                             format(datos,sizeof(datos),"    ApplyActorAnimation(actorid[%d], \"%s\", \"%s\", 4.1, 1, 1, 1, 1, 1);\r\n", xx, InfoActorEdicion[xx][a_animlib],InfoActorEdicion[xx][a_animname]);
  557.                             fwrite(archivos, datos);
  558.                             fwrite(archivos, "  // NOTE: changing the settings: (Float:fDelta, loop, lockx, locky, freeze, time) \r\n");
  559.                             fwrite(archivos, "  // https://wiki.sa-mp.com/wiki/ApplyActorAnimation \r\n\r\n");
  560.                         }
  561.                         fwrite(archivos, "  return true;\r\n");
  562.                         fwrite(archivos, "}\r\n\r\n");
  563.                         fwrite(archivos, "public OnPlayerGiveDamageActor(playerid, damaged_actorid, Float: amount, weaponid, bodypart){\r\n\r\n");
  564.                         fwrite(archivos, "    new\r\n");
  565.                         fwrite(archivos, "      Float:health;\r\n");
  566.                         fwrite(archivos, "    GetActorHealth(actorid[damaged_actorid], health);\r\n");
  567.                         fwrite(archivos, "  if(IsValidActor(actorid[damaged_actorid])){\r\n");
  568.                         fwrite(archivos, "      if(!IsActorInvulnerable(actorid[damaged_actorid])){\r\n");
  569.                         fwrite(archivos, "          SetActorHealth(actorid[damaged_actorid], (health-amount));\r\n");
  570.                         fwrite(archivos, "          if(health<=0.0){\r\n");
  571.                         fwrite(archivos, "              SetActorHealth(actorid[damaged_actorid], 100.0);\r\n");
  572.                         fwrite(archivos, "          }\r\n");
  573.                         fwrite(archivos, "      }\r\n");
  574.                         fwrite(archivos, "  }\r\n\r\n");
  575.                         fwrite(archivos, "  return true;\r\n");
  576.                         fwrite(archivos, "}\r\n\r\n");
  577.                         fwrite(archivos, "/*  * MORE FEATURES...: \r\n\r\n");
  578.                         fwrite(archivos, "      GetActorPos                 => https://wiki.sa-mp.com/wiki/GetActorPos \r\n");
  579.                         fwrite(archivos, "      GetActorVirtualWorld        => https://wiki.sa-mp.com/wiki/GetActorVirtualWorld \r\n");
  580.                         fwrite(archivos, "      GetPlayerTargetActor        => https://wiki.sa-mp.com/wiki/GetPlayerTargetActor \r\n");
  581.                         fwrite(archivos, "      IsActorInvulnerable         => https://wiki.sa-mp.com/wiki/IsActorInvulnerable \r\n");
  582.                         fwrite(archivos, "      IsActorStreamedIn           => https://wiki.sa-mp.com/wiki/IsActorStreamedIn \r\n");
  583.                         fwrite(archivos, "      IsValidActor                => https://wiki.sa-mp.com/wiki/IsValidActor \r\n");
  584.                         fwrite(archivos, "      OnActorStreamIn             => https://wiki.sa-mp.com/wiki/OnActorStreamIn \r\n");
  585.                         fwrite(archivos, "      OnActorStreamOut            => https://wiki.sa-mp.com/wiki/OnActorStreamOut \r\n");
  586.                         fwrite(archivos, "      OnPlayerGiveDamageActor     => https://wiki.sa-mp.com/wiki/OnPlayerGiveDamageActor \r\n");
  587.                         fwrite(archivos, "      SetActorFacingAngle         => https://wiki.sa-mp.com/wiki/SetActorFacingAngle \r\n");
  588.                         fwrite(archivos, "      SetActorHealth              => https://wiki.sa-mp.com/wiki/SetActorHealth \r\n");
  589.                         fwrite(archivos, "      SetActorInvulnerable        => https://wiki.sa-mp.com/wiki/SetActorInvulnerable \r\n");
  590.                         fwrite(archivos, "      SetActorPos                 => https://wiki.sa-mp.com/wiki/SetActorPos \r\n");
  591.                         fwrite(archivos, "      SetActorVirtualWorld        => https://wiki.sa-mp.com/wiki/SetActorVirtualWorld \r\n");
  592.                         fwrite(archivos, "      ApplyActorAnimation         => https://wiki.sa-mp.com/wiki/ApplyActorAnimation \r\n");
  593.                         fwrite(archivos, "      ClearActorAnimations        => https://wiki.sa-mp.com/wiki/ClearActorAnimations \r\n");
  594.                         fwrite(archivos, "      CreateActor                 => https://wiki.sa-mp.com/wiki/CreateActor \r\n");
  595.                         fwrite(archivos, "      DestroyActor                => https://wiki.sa-mp.com/wiki/DestroyActor \r\n");
  596.                         fwrite(archivos, "      GetActorFacingAngle         => https://wiki.sa-mp.com/wiki/GetActorFacingAngle \r\n");
  597.                         fwrite(archivos, "      GetActorHealth              => https://wiki.sa-mp.com/wiki/GetActorHealth \r\n");
  598.                         fwrite(archivos, "      GetActorPoolSize            => https://wiki.sa-mp.com/wiki/GetActorPoolSize \r\n\r\n");
  599.                         fwrite(archivos, "*/ \r\n\r\n");
  600.                         fwrite(archivos, "/**** Editing system actors - By OTACON ****/\r\n\r\n");
  601.                         fclose(archivos);
  602.                     }
  603.  
  604.                     format(data,sizeof(data),"{005BA1}INFO: haz guardado todos los actores correctamente!. actors created in total: [%d/%d].",cantidad_actores,MAX_ACTORS);
  605.                     SendClientMessage(playerid,-1,data);
  606.                     format(data,sizeof(data),"{005BA1}INFO: all players have been saved in the file: 'actors.%d04.txt', en 'scriptfiles'.",cantidad_archivos);
  607.                     SendClientMessage(playerid,-1,data);
  608.                     SendClientMessage(playerid,-1,"{EEE019}INFO: the editor is restarted, all the players have been eliminated!.");
  609.                     cantidad_archivos++;
  610.                     for(new xx=1; xx<cantidad_actores+1; xx++){
  611.                         if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
  612.                             continue;
  613.                         DestroyActor(InfoActorEdicion[xx][c_actor]);
  614.                         Delete3DTextLabel(InfoActorEdicion[xx][label]);
  615.                         InfoActorEdicion[xx][a_skin] = 0;
  616.                         InfoActorEdicion[xx][c_actor] = 0;
  617.                         InfoActorEdicion[xx][i_actor] = false;
  618.                         InfoActorEdicion[xx][h_actor] = 0.0;
  619.                         InfoActorEdicion[xx][color_actor] = -1;
  620.                         format(InfoActorEdicion[xx][a_animlib],32,"%s","null");
  621.                         format(InfoActorEdicion[xx][a_animname],32,"%s","null");
  622.                         format(InfoActorEdicion[xx][a_name],24,"%s","Actor");
  623.                         DestroyObject(InfoActorEdicion[xx][objeto_select]);
  624.                     }
  625.                     cantidad_actores=0;
  626.                 }
  627.             }
  628.         }
  629.  
  630.         case DIALOG_ACTORS+5:{
  631.             if(response){
  632.                 ShowPlayerDialog(playerid, DIALOG_ACTORS+6, DIALOG_STYLE_INPUT, "{FF6800}Editing system actors:", "\
  633.                 {FFFFFF}id type of actor who want to establish:. ", "accept", "cancel");
  634.             }else CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  635.         }
  636.  
  637.         case DIALOG_ACTORS+6:{
  638.             if(response){
  639.                 new opcion;
  640.                 if(!sscanf(inputtext, "d", opcion)){
  641.                     if( IsValidActor(InfoActorEdicion[opcion][c_actor]) ){
  642.                         id_seleccionado = opcion;
  643.                         format(data,sizeof(data),"{FFFFFF}INFO: the actor id is established: id:%d", id_seleccionado);
  644.                         SendClientMessage(playerid,-1,data);
  645.                         CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  646.                     }else{
  647.                         ShowPlayerDialog(playerid, DIALOG_ACTORS+6, DIALOG_STYLE_INPUT, "{FF6800}Editing system actors:", "\
  648.                         {FFFFFF}id type of actor who want to establish: \n\
  649.                         {A50000}NOTE: You have not written anything, try again. ", "accept", "cancel");
  650.                     }
  651.                 }else{
  652.                     ShowPlayerDialog(playerid, DIALOG_ACTORS+6, DIALOG_STYLE_INPUT, "{FF6800}Editing system actors:", "\
  653.                     {FFFFFF}id type of actor who want to establish: \n\
  654.                     {A50000}NOTE: You have not written anything, try again. ", "accept", "cancel");
  655.                 }
  656.             }else CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  657.         }
  658.  
  659.         case DIALOG_ACTORS+7:{
  660.             if(response){
  661.                 ShowPlayerDialog(playerid, DIALOG_ACTORS+8, DIALOG_STYLE_INPUT, "{FF6800}Editing system actors:", "\
  662.                 {FFFFFF}id type that has the actor, must be greater or equal to 0 and less than or equal to 311.\n\
  663.                 {A50000}NOTE: You can use the 'default' that will apply a random id from 0 to 311. ", "accept", "by default");
  664.             }else{
  665.                 cantidad_actores++;
  666.                 InfoActorEdicion[cantidad_actores][a_skin] = 0;
  667.                 InfoActorEdicion[cantidad_actores][i_actor] = false;
  668.                 InfoActorEdicion[cantidad_actores][h_actor] = 0.0;
  669.                 InfoActorEdicion[cantidad_actores][color_actor] = -1;
  670.                 format(InfoActorEdicion[cantidad_actores][a_animlib],32,"%s","null");
  671.                 format(InfoActorEdicion[cantidad_actores][a_animname],32,"%s","null");
  672.                 format(InfoActorEdicion[cantidad_actores][a_name],24,"%s","Actor");
  673.  
  674.                 InfoActorEdicion[cantidad_actores][a_skin] = random(311);
  675.                 InfoActorEdicion[cantidad_actores][c_actor] = CreateActor(InfoActorEdicion[cantidad_actores][a_skin], pos[0],pos[1],pos[2], pos[3]);
  676.                 SetActorPos(InfoActorEdicion[cantidad_actores][c_actor], pos[0],pos[1],pos[2]);
  677.                 SetActorFacingAngle(InfoActorEdicion[cantidad_actores][c_actor], pos[3]);
  678.                 SetActorVirtualWorld(InfoActorEdicion[cantidad_actores][c_actor], virtualword);
  679.                 InfoActorEdicion[cantidad_actores][h_actor] = vida_id;
  680.                 SetActorHealth(InfoActorEdicion[cantidad_actores][c_actor], InfoActorEdicion[cantidad_actores][h_actor]);
  681.                 InfoActorEdicion[cantidad_actores][i_actor] = actor_Invulnerable;
  682.                 SetActorInvulnerable(InfoActorEdicion[cantidad_actores][c_actor], InfoActorEdicion[cantidad_actores][i_actor]);
  683.                 InfoActorEdicion[cantidad_actores][objeto_select] = CreateObject(18631, pos[0],pos[1],pos[2], 0,0,0);
  684.  
  685.                 InfoActorEdicion[cantidad_actores][label] = Create3DTextLabel("_",-1,pos[0],pos[1],pos[2]+1,10,virtualword,0);
  686.                 format(InfoActorEdicion[cantidad_actores][a_name],25,"%s","Actor");
  687.                 format(data,sizeof(data),"%s:(id:%d)",InfoActorEdicion[cantidad_actores][a_name],cantidad_actores);
  688.                 Update3DTextLabelText(InfoActorEdicion[cantidad_actores][label],InfoActorEdicion[cantidad_actores][color_actor],data);
  689.                 pos[0]=pos[0]-(1*floatsin(-pos[3],degrees));
  690.                 pos[1]=pos[1]-(1*floatcos(-pos[3],degrees));
  691.                 SetPlayerPos(playerid, pos[0],pos[1],pos[2]);
  692.  
  693.                 format(data,sizeof(data),"{EEE019}INFO: beam created an actor correctly!. actors created in total: [%d/%d].",cantidad_actores,MAX_ACTORS);
  694.                 SendClientMessage(playerid,-1,data);
  695.             }
  696.         }
  697.  
  698.         case DIALOG_ACTORS+8:{
  699.             if(response){
  700.                 new ropa;
  701.                 if(!sscanf(inputtext, "d", ropa)){
  702.                     if(ropa>=0 && ropa<=311){
  703.                         cantidad_actores++;
  704.                         InfoActorEdicion[cantidad_actores][a_skin] = 0;
  705.                         InfoActorEdicion[cantidad_actores][i_actor] = false;
  706.                         InfoActorEdicion[cantidad_actores][h_actor] = 0.0;
  707.                         InfoActorEdicion[cantidad_actores][color_actor] = -1;
  708.                         format(InfoActorEdicion[cantidad_actores][a_animlib],32,"%s","null");
  709.                         format(InfoActorEdicion[cantidad_actores][a_animname],32,"%s","null");
  710.                         format(InfoActorEdicion[cantidad_actores][a_name],24,"%s","Actor");
  711.  
  712.                         InfoActorEdicion[cantidad_actores][a_skin] = ropa;
  713.                         InfoActorEdicion[cantidad_actores][c_actor] = CreateActor(InfoActorEdicion[cantidad_actores][a_skin], pos[0],pos[1],pos[2], pos[3]);
  714.                         SetActorPos(InfoActorEdicion[cantidad_actores][c_actor], pos[0],pos[1],pos[2]);
  715.                         SetActorFacingAngle(InfoActorEdicion[cantidad_actores][c_actor], pos[3]);
  716.                         SetActorVirtualWorld(InfoActorEdicion[cantidad_actores][c_actor], virtualword);
  717.                         InfoActorEdicion[cantidad_actores][h_actor] = vida_id;
  718.                         SetActorHealth(InfoActorEdicion[cantidad_actores][c_actor], InfoActorEdicion[cantidad_actores][h_actor]);
  719.                         InfoActorEdicion[cantidad_actores][i_actor] = actor_Invulnerable;
  720.                         SetActorInvulnerable(InfoActorEdicion[cantidad_actores][c_actor], InfoActorEdicion[cantidad_actores][i_actor]);
  721.                         InfoActorEdicion[cantidad_actores][objeto_select] = CreateObject(18631, pos[0],pos[1],pos[2], 0,0,0);
  722.  
  723.                         InfoActorEdicion[cantidad_actores][label] = Create3DTextLabel("_",-1,pos[0],pos[1],pos[2]+1,10,virtualword,0);
  724.                         format(InfoActorEdicion[cantidad_actores][a_name],25,"%s","Actor");
  725.                         format(data,sizeof(data),"%s:(id:%d)",InfoActorEdicion[cantidad_actores][a_name],cantidad_actores);
  726.                         Update3DTextLabelText(InfoActorEdicion[cantidad_actores][label],InfoActorEdicion[cantidad_actores][color_actor],data);
  727.                         pos[0]=pos[0]-(1*floatsin(-pos[3],degrees));
  728.                         pos[1]=pos[1]-(1*floatcos(-pos[3],degrees));
  729.                         SetPlayerPos(playerid, pos[0],pos[1],pos[2]);
  730.  
  731.                         format(data,sizeof(data),"{EEE019}INFO: beam created an actor correctly!. actors created in total: [%d/%d].",cantidad_actores,MAX_ACTORS);
  732.                         SendClientMessage(playerid,-1,data);
  733.                     }else{
  734.                         ShowPlayerDialog(playerid, DIALOG_ACTORS+8, DIALOG_STYLE_INPUT, "{FF6800}Editing system actors:", "\
  735.                         {FFFFFF}id type that has the actor, must be greater or equal to 0 and less than or equal to 311.\n\
  736.                         {A50000}NOTE: You can use the 'default' that will apply a random id from 0 to 311. ", "accept", "by default");
  737.                     }
  738.                 }else{
  739.                     ShowPlayerDialog(playerid, DIALOG_ACTORS+8, DIALOG_STYLE_INPUT, "{FF6800}Editing system actors:", "\
  740.                     {FFFFFF}id type that has the actor, must be greater or equal to 0 and less than or equal to 311.\n\
  741.                     {A50000}NOTE: You can use the 'default' that will apply a random id from 0 to 311. ", "accept", "by default");
  742.                 }
  743.             }else{
  744.                 cantidad_actores++;
  745.                 InfoActorEdicion[cantidad_actores][a_skin] = 0;
  746.                 InfoActorEdicion[cantidad_actores][i_actor] = false;
  747.                 InfoActorEdicion[cantidad_actores][h_actor] = 0.0;
  748.                 InfoActorEdicion[cantidad_actores][color_actor] = -1;
  749.                 format(InfoActorEdicion[cantidad_actores][a_animlib],32,"%s","null");
  750.                 format(InfoActorEdicion[cantidad_actores][a_animname],32,"%s","null");
  751.                 format(InfoActorEdicion[cantidad_actores][a_name],24,"%s","Actor");
  752.  
  753.                 InfoActorEdicion[cantidad_actores][a_skin] = random(311);
  754.                 InfoActorEdicion[cantidad_actores][c_actor] = CreateActor(InfoActorEdicion[cantidad_actores][a_skin], pos[0],pos[1],pos[2], pos[3]);
  755.                 SetActorPos(InfoActorEdicion[cantidad_actores][c_actor], pos[0],pos[1],pos[2]);
  756.                 SetActorFacingAngle(InfoActorEdicion[cantidad_actores][c_actor], pos[3]);
  757.                 SetActorVirtualWorld(InfoActorEdicion[cantidad_actores][c_actor], virtualword);
  758.                 InfoActorEdicion[cantidad_actores][h_actor] = vida_id;
  759.                 SetActorHealth(InfoActorEdicion[cantidad_actores][c_actor], InfoActorEdicion[cantidad_actores][h_actor]);
  760.                 InfoActorEdicion[cantidad_actores][i_actor] = actor_Invulnerable;
  761.                 SetActorInvulnerable(InfoActorEdicion[cantidad_actores][c_actor], InfoActorEdicion[cantidad_actores][i_actor]);
  762.                 InfoActorEdicion[cantidad_actores][objeto_select] = CreateObject(18631, pos[0],pos[1],pos[2], 0,0,0);
  763.  
  764.                 InfoActorEdicion[cantidad_actores][label] = Create3DTextLabel("_",-1,pos[0],pos[1],pos[2]+1,10,virtualword,0);
  765.                 format(InfoActorEdicion[cantidad_actores][a_name],25,"%s","Actor");
  766.                 format(data,sizeof(data),"%s:(id:%d)",InfoActorEdicion[cantidad_actores][a_name],cantidad_actores);
  767.                 Update3DTextLabelText(InfoActorEdicion[cantidad_actores][label],InfoActorEdicion[cantidad_actores][color_actor],data);
  768.                 pos[0]=pos[0]-(1*floatsin(-pos[3],degrees));
  769.                 pos[1]=pos[1]-(1*floatcos(-pos[3],degrees));
  770.                 SetPlayerPos(playerid, pos[0],pos[1],pos[2]);
  771.  
  772.                 format(data,sizeof(data),"{EEE019}INFO: beam created an actor correctly!. actors created in total: [%d/%d].",cantidad_actores,MAX_ACTORS);
  773.                 SendClientMessage(playerid,-1,data);
  774.             }
  775.         }
  776.  
  777.         case DIALOG_ACTORS+9:{
  778.             if(response){
  779.                 new name_a[25];
  780.                 if(!sscanf(inputtext, "s[25]", name_a)){
  781.                     if(strlen(name_a)>=4 && strlen(name_a)<=24){
  782.                         format(InfoActorEdicion[id_seleccionado][a_name],25,"%s",name_a);
  783.                         format(data,sizeof(data),"%s:(id:%d)",InfoActorEdicion[id_seleccionado][a_name],id_seleccionado);
  784.                         Update3DTextLabelText(InfoActorEdicion[id_seleccionado][label],InfoActorEdicion[id_seleccionado][color_actor],data);
  785.  
  786.                         format(data,sizeof(data),"{FFFFFF}INFO: do you renamed the actor id:%d, correctamente!.", id_seleccionado);
  787.                         SendClientMessage(playerid,-1,data);
  788.                         format(data,sizeof(data),"{EEE019}NOTA: Now the actor id:%d It is named after :%s.", id_seleccionado,InfoActorEdicion[id_seleccionado][a_name]);
  789.                         SendClientMessage(playerid,-1,data);
  790.                         CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  791.                     }else{
  792.                         format(data,sizeof(data),"{FFFFFF}¿Place you want to name the actor id:%d?: \n\
  793.                         {A50000}(NOTE: Enter the name you want to have the actor id:%d,  \n\
  794.                         It must be greater or equal to 4 and less than or equal to 24).", id_seleccionado,id_seleccionado);
  795.                         ShowPlayerDialog(playerid, DIALOG_ACTORS+9, DIALOG_STYLE_INPUT, "{FF6800}Editing system actors:", data, "accept", "cancel");
  796.                     }
  797.                 }else{
  798.                     format(data,sizeof(data),"{FFFFFF}¿Place you want to name the actor id:%d?: \n\
  799.                     {A50000}(NOTE: Enter the name you want to have the actor id:%d,  \n\
  800.                     It must be greater or equal to 4 and less than or equal to 24).", id_seleccionado,id_seleccionado);
  801.                     ShowPlayerDialog(playerid, DIALOG_ACTORS+9, DIALOG_STYLE_INPUT, "{FF6800}Editing system actors:", data, "accept", "cancel");
  802.                 }
  803.             }else CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  804.         }
  805.  
  806.         case DIALOG_ACTORS+10:{
  807.             if(response){
  808.                 new name_a[25];
  809.                 if(!sscanf(inputtext, "s[25]", name_a)){
  810.                     if(strlen(name_a)>=4 && strlen(name_a)<=24){
  811.                         for(new xx=0; xx<cantidad_actores+1; xx++){
  812.                             if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
  813.                                 continue;
  814.                             format(InfoActorEdicion[xx][a_name],25,"%s",name_a);
  815.                             format(data,sizeof(data),"%s:(id:%d)",InfoActorEdicion[xx][a_name],xx);
  816.                             Update3DTextLabelText(InfoActorEdicion[xx][label],InfoActorEdicion[xx][color_actor],data);
  817.                         }
  818.                         format(data,sizeof(data),"{FFFFFF}INFO: do you renamed the %d actors created correctly!.", cantidad_actores);
  819.                         SendClientMessage(playerid,-1,data);
  820.                         format(data,sizeof(data),"{EEE019}NOTA: now the %d actors are named :%s.", cantidad_actores,name_a);
  821.                         SendClientMessage(playerid,-1,data);
  822.                         CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  823.                     }else{
  824.                         format(data,sizeof(data),"{FFFFFF}¿You want to place them to name %d actors created?: \n\
  825.                         {A50000}(NOTE: Enter the name you want to have the% d player created,  \n\
  826.                         It must be greater or equal to 4 and less than or equal to 24).", cantidad_actores,cantidad_actores);
  827.                         ShowPlayerDialog(playerid, DIALOG_ACTORS+10, DIALOG_STYLE_INPUT, "{FF6800}Editing system actors:", data, "accept", "cancel");
  828.                     }
  829.                 }else{
  830.                     format(data,sizeof(data),"{FFFFFF}¿You want to place them to name %d actors created?: \n\
  831.                     {A50000}(NOTE: Enter the name you want to have the% d player created,  \n\
  832.                     It must be greater or equal to 4 and less than or equal to 24).", cantidad_actores,cantidad_actores);
  833.                     ShowPlayerDialog(playerid, DIALOG_ACTORS+10, DIALOG_STYLE_INPUT, "{FF6800}Editing system actors:", data, "accept", "cancel");
  834.                 }
  835.             }else CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  836.         }
  837.  
  838.         case DIALOG_ACTORS+11:{
  839.             if(response){
  840.                 switch(listitem){
  841.                     case 0:{
  842.                         if(IsPlayerInAnyVehicle(playerid)){
  843.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  844.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: You can not use the editor of actors from a vehicle!."); }
  845.                         if(!creando_actors[playerid]){
  846.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  847.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: you are not the editor of actors on!."); }
  848.                         if(cantidad_actores<=0){
  849.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  850.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: there is not actor created so far!."); }
  851.  
  852.                         ShowPlayerDialog(playerid, DIALOG_ACTORS+5, DIALOG_STYLE_MSGBOX, "{FF6800}Editing system actors:", "\
  853.                         {FFFFFF}¿You want to select a specific id of an actor created?:", "accept", "cancel");
  854.                     }
  855.                     case 1:{
  856.                         if(IsPlayerInAnyVehicle(playerid)){
  857.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  858.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: You can not use the editor of actors from a vehicle!."); }
  859.                         if(!creando_actors[playerid]){
  860.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  861.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: you are not the editor of actors on!."); }
  862.                         if(cantidad_actores<=0){
  863.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  864.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: there is not actor created so far!."); }
  865.                         if(id_seleccionado<=0){
  866.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  867.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: you have not selected any id for editing!."); }
  868.  
  869.                         GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
  870.  
  871.                         format(InfoActorEdicion[id_seleccionado][a_animlib],32,"%s",animlib);
  872.                         format(InfoActorEdicion[id_seleccionado][a_animname],32,"%s",animname);
  873.                         ClearActorAnimations(InfoActorEdicion[id_seleccionado][c_actor]);
  874.                         ApplyActorAnimation(InfoActorEdicion[id_seleccionado][c_actor], InfoActorEdicion[id_seleccionado][a_animlib], InfoActorEdicion[id_seleccionado][a_animname], 4.1, 0, 0, 0, 0, 0);
  875.                         ApplyActorAnimation(InfoActorEdicion[id_seleccionado][c_actor], InfoActorEdicion[id_seleccionado][a_animlib], InfoActorEdicion[id_seleccionado][a_animname], 4.1, 0, 0, 0, 0, 0);
  876.  
  877.                         format(data,sizeof(data),"{EEE019}INFO: you have an animation applied to the actor id:%d, correctly!.",id_seleccionado);
  878.                         SendClientMessage(playerid,-1,data);
  879.                         CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  880.                     }
  881.                     case 2:{
  882.                         if(IsPlayerInAnyVehicle(playerid)){
  883.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  884.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: You can not use the editor of actors from a vehicle!."); }
  885.                         if(!creando_actors[playerid]){
  886.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  887.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: you are not the editor of actors on!."); }
  888.                         if(cantidad_actores<=0){
  889.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  890.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: there is not actor created so far!."); }
  891.  
  892.                         GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
  893.  
  894.                         for(new xx=0; xx<cantidad_actores+1; xx++){
  895.                             if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
  896.                                 continue;
  897.  
  898.                             format(InfoActorEdicion[xx][a_animlib],32,"%s",animlib);
  899.                             format(InfoActorEdicion[xx][a_animname],32,"%s",animname);
  900.                             ClearActorAnimations(InfoActorEdicion[xx][c_actor]);
  901.                             ApplyActorAnimation(InfoActorEdicion[xx][c_actor], InfoActorEdicion[xx][a_animlib], InfoActorEdicion[xx][a_animname], 4.1, 0, 0, 0, 0, 0);
  902.                             ApplyActorAnimation(InfoActorEdicion[xx][c_actor], InfoActorEdicion[xx][a_animlib], InfoActorEdicion[xx][a_animname], 4.1, 0, 0, 0, 0, 0);
  903.                         }
  904.                         SendClientMessage(playerid,-1,"{EEE019}INFO: you have an animation applied to all players created, correctly!.");
  905.                         CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  906.                     }
  907.                     case 3:{
  908.                         if(IsPlayerInAnyVehicle(playerid)){
  909.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  910.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: You can not use the editor of actors from a vehicle!."); }
  911.                         if(!creando_actors[playerid]){
  912.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  913.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: you are not the editor of actors on!."); }
  914.                         if(cantidad_actores<=0){
  915.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  916.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: there is not actor created so far!."); }
  917.                         if(id_seleccionado<=0){
  918.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  919.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: you have not selected any id for editing!."); }
  920.  
  921.                         format(data,sizeof(data),"{FFFFFF}¿Place you want to name the actor id:%d?:",id_seleccionado);
  922.                         ShowPlayerDialog(playerid, DIALOG_ACTORS+9, DIALOG_STYLE_INPUT, "{FF6800}Editing system actors:", data, "accept", "cancel");
  923.                     }
  924.                     case 4:{
  925.                         if(IsPlayerInAnyVehicle(playerid)){
  926.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  927.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: You can not use the editor of actors from a vehicle!."); }
  928.                         if(!creando_actors[playerid]){
  929.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  930.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: you are not the editor of actors on!."); }
  931.                         if(cantidad_actores<=0){
  932.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  933.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: there is not actor created so far!."); }
  934.  
  935.                         format(data,sizeof(data),"{FFFFFF}¿You want to place them to name %d actors created?:",cantidad_actores);
  936.                         ShowPlayerDialog(playerid, DIALOG_ACTORS+10, DIALOG_STYLE_INPUT, "{FF6800}Editing system actors:", data, "accept", "cancel");
  937.                     }
  938.                     case 5:{
  939.                         if(IsPlayerInAnyVehicle(playerid)){
  940.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  941.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: You can not use the editor of actors from a vehicle!."); }
  942.                         if(!creando_actors[playerid]){
  943.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  944.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: you are not the editor of actors on!."); }
  945.                         if(cantidad_actores<=0){
  946.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  947.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: there is not actor created so far!."); }
  948.                         if(id_seleccionado<=0){
  949.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  950.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: you have not selected any id for editing!."); }
  951.  
  952.                         seleccionando_skins[playerid][0] = true;
  953.                         format(data,sizeof(data),"{FFFFFF}\n\t\t * displaying skin: [ %d / 311 ] \n\n\
  954.                         \t\t{FF6800}>>: select your preferred option: \n\
  955.                         option - skin'>>' \n\
  956.                         option - skin'<<' \n\
  957.                         option - skin'random'  \n",seleccion_skis);
  958.                         ShowPlayerDialog(playerid, DIALOG_ACTORS+12, DIALOG_STYLE_LIST, "{FF6800}Editing system actors:", data, "select", "finish");
  959.                     }
  960.                     case 6:{
  961.                         if(IsPlayerInAnyVehicle(playerid)){
  962.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  963.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: You can not use the editor of actors from a vehicle!."); }
  964.                         if(!creando_actors[playerid]){
  965.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  966.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: you are not the editor of actors on!."); }
  967.                         if(cantidad_actores<=0){
  968.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  969.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: there is not actor created so far!."); }
  970.  
  971.                         seleccionando_skins[playerid][1] = true;
  972.                         format(data,sizeof(data),"{FFFFFF}\n\t\t * displaying skin: [ %d / 311 ] \n\n\
  973.                         \t\t{FF6800}>>: select your preferred option: \n\
  974.                         option - skin'>>' \n\
  975.                         option - skin'<<' \n\
  976.                         option - skin'random'  \n",seleccion_skis);
  977.                         ShowPlayerDialog(playerid, DIALOG_ACTORS+13, DIALOG_STYLE_LIST, "{FF6800}Editing system actors:", data, "select", "finish");
  978.                     }
  979.                     case 7:{
  980.                         if(IsPlayerInAnyVehicle(playerid)){
  981.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  982.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: You can not use the editor of actors from a vehicle!."); }
  983.                         if(!creando_actors[playerid]){
  984.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  985.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: you are not the editor of actors on!."); }
  986.                         if(cantidad_actores<=0){
  987.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  988.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: there is not actor created so far!."); }
  989.                         if(id_seleccionado<=0){
  990.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  991.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: you have not selected any id for editing!."); }
  992.  
  993.                         ShowPlayerDialog(playerid, DIALOG_ACTORS+14, DIALOG_STYLE_INPUT, "{FF6800}Editing system actors:", "\
  994.                         {FFFFFF}put the color you want to place the name of all players: \n\
  995.                         {A50000}(NOTE: The color format must be in 'hex' example: 0xFFFFFFFF \n\
  996.                         ", "accept", "cancel");
  997.                     }
  998.                     case 8:{
  999.                         if(IsPlayerInAnyVehicle(playerid)){
  1000.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  1001.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: You can not use the editor of actors from a vehicle!."); }
  1002.                         if(!creando_actors[playerid]){
  1003.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  1004.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: you are not the editor of actors on!."); }
  1005.                         if(cantidad_actores<=0){
  1006.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  1007.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: there is not actor created so far!."); }
  1008.  
  1009.                         ShowPlayerDialog(playerid, DIALOG_ACTORS+15, DIALOG_STYLE_INPUT, "{FF6800}Editing system actors:", "\
  1010.                         {FFFFFF}put the color you want to place the name of all players: \n\
  1011.                         {A50000}(NOTE: The color format must be in 'hex' example: 0xFFFFFFFF \n\
  1012.                         ", "accept", "cancel");
  1013.                     }
  1014.                     case 9:{
  1015.                         if(IsPlayerInAnyVehicle(playerid)){
  1016.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  1017.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: You can not use the editor of actors from a vehicle!."); }
  1018.                         if(!creando_actors[playerid]){
  1019.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  1020.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: you are not the editor of actors on!."); }
  1021.                         if(cantidad_actores<=0){
  1022.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  1023.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: there is not actor created so far!."); }
  1024.  
  1025.                         seleccioando_actor[playerid][0]=true;
  1026.                         SelectObject(playerid);
  1027.                         SendClientMessage(playerid,-1,"{EEE019}INFO: Now select an actor to establish its id!.");
  1028.                         SendClientMessage(playerid,-1,"{FFFFFF}INFO: to change the camera when you're in edit mode,");
  1029.                         SendClientMessage(playerid,-1,"{FFFFFF}Keep the 'TAB' key and moving the 'mouse' to change!.");
  1030.                     }
  1031.                     case 10:{
  1032.                         if(IsPlayerInAnyVehicle(playerid)){
  1033.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  1034.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: You can not use the editor of actors from a vehicle!."); }
  1035.                         if(!creando_actors[playerid]){
  1036.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  1037.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: you are not the editor of actors on!."); }
  1038.                         if(cantidad_actores<=0){
  1039.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  1040.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: there is not actor created so far!."); }
  1041.  
  1042.                         seleccioando_actor[playerid][1]=true;
  1043.                         SelectObject(playerid);
  1044.                         SendClientMessage(playerid,-1,"{EEE019}INFO: Now select an actor to begin to move!.");
  1045.                         SendClientMessage(playerid,-1,"{FFFFFF}INFO: to change the camera when you're in edit mode,");
  1046.                         SendClientMessage(playerid,-1,"{FFFFFF}Keep the 'TAB' key and moving the 'mouse' to change!.");
  1047.                     }
  1048.                 }
  1049.             }
  1050.         }
  1051.  
  1052.         case DIALOG_ACTORS+12:{
  1053.             if(response){
  1054.                 switch(listitem){
  1055.                     case 3:{
  1056.                         if(!seleccionando_skins[playerid][0]){
  1057.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  1058.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: you have not selected any id for editing!.");}
  1059.  
  1060.                         if(seleccion_skis>=311) seleccion_skis=311;
  1061.                         else seleccion_skis++;
  1062.                         format(data,sizeof(data),"{FFFFFF}\n\t\t * displaying skin: [ %d / 311 ] \n\n\
  1063.                         \t\t{FF6800}>>: select your preferred option: \n\
  1064.                         option - skin'>>' \n\
  1065.                         option - skin'<<' \n\
  1066.                         option - skin'random'  \n",seleccion_skis);
  1067.                         ShowPlayerDialog(playerid, DIALOG_ACTORS+12, DIALOG_STYLE_LIST, "{FF6800}Editing system actors:", data, "select", "finish");
  1068.  
  1069.                         GetActorPos(InfoActorEdicion[id_seleccionado][c_actor], pos[0],pos[1],pos[2]);
  1070.                         GetActorFacingAngle(InfoActorEdicion[id_seleccionado][c_actor], pos[3]);
  1071.                         DestroyActor(InfoActorEdicion[id_seleccionado][c_actor]);
  1072.                         InfoActorEdicion[id_seleccionado][a_skin] = seleccion_skis;
  1073.                         InfoActorEdicion[id_seleccionado][c_actor] = CreateActor(InfoActorEdicion[id_seleccionado][a_skin], pos[0],pos[1],pos[2], pos[3]);
  1074.                     }
  1075.                     case 4:{
  1076.                         if(!seleccionando_skins[playerid][0]){
  1077.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  1078.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: you have not selected any id for editing!."); }
  1079.  
  1080.                         if(seleccion_skis<=0) seleccion_skis=0;
  1081.                         else seleccion_skis--;
  1082.                         format(data,sizeof(data),"{FFFFFF}\n\t\t * displaying skin: [ %d / 311 ] \n\n\
  1083.                         \t\t{FF6800}>>: select your preferred option: \n\
  1084.                         option - skin'>>' \n\
  1085.                         option - skin'<<' \n\
  1086.                         option - skin'random'  \n",seleccion_skis);
  1087.                         ShowPlayerDialog(playerid, DIALOG_ACTORS+12, DIALOG_STYLE_LIST, "{FF6800}Editing system actors:", data, "select", "finish");
  1088.  
  1089.                         GetActorPos(InfoActorEdicion[id_seleccionado][c_actor], pos[0],pos[1],pos[2]);
  1090.                         GetActorFacingAngle(InfoActorEdicion[id_seleccionado][c_actor], pos[3]);
  1091.                         DestroyActor(InfoActorEdicion[id_seleccionado][c_actor]);
  1092.                         InfoActorEdicion[id_seleccionado][a_skin] = seleccion_skis;
  1093.                         InfoActorEdicion[id_seleccionado][c_actor] = CreateActor(InfoActorEdicion[id_seleccionado][a_skin], pos[0],pos[1],pos[2], pos[3]);
  1094.                     }
  1095.                     case 5:{
  1096.                         if(!seleccionando_skins[playerid][0]){
  1097.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  1098.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: you have not selected any id for editing!."); }
  1099.  
  1100.                         seleccion_skis=random(311);
  1101.                         format(data,sizeof(data),"{FFFFFF}\n\t\t * displaying skin: [ %d / 311 ] \n\n\
  1102.                         \t\t{FF6800}>>: select your preferred option: \n\
  1103.                         option - skin'>>' \n\
  1104.                         option - skin'<<' \n\
  1105.                         option - skin'random'  \n",seleccion_skis);
  1106.                         ShowPlayerDialog(playerid, DIALOG_ACTORS+12, DIALOG_STYLE_LIST, "{FF6800}Editing system actors:", data, "select", "finish");
  1107.  
  1108.                         GetActorPos(InfoActorEdicion[id_seleccionado][c_actor], pos[0],pos[1],pos[2]);
  1109.                         GetActorFacingAngle(InfoActorEdicion[id_seleccionado][c_actor], pos[3]);
  1110.                         DestroyActor(InfoActorEdicion[id_seleccionado][c_actor]);
  1111.                         InfoActorEdicion[id_seleccionado][a_skin] = seleccion_skis;
  1112.                         InfoActorEdicion[id_seleccionado][c_actor] = CreateActor(InfoActorEdicion[id_seleccionado][a_skin], pos[0],pos[1],pos[2], pos[3]);
  1113.                     }
  1114.                     default:{
  1115.                         format(data,sizeof(data),"{FFFFFF}\n\t\t * displaying skin: [ %d / 311 ] \n\n\
  1116.                         \t\t{FF6800}>>: select your preferred option: \n\
  1117.                         option - skin'>>' \n\
  1118.                         option - skin'<<' \n\
  1119.                         option - skin'random'  \n",seleccion_skis);
  1120.                         ShowPlayerDialog(playerid, DIALOG_ACTORS+12, DIALOG_STYLE_LIST, "{FF6800}Editing system actors:", data, "select", "finish");
  1121.                     }
  1122.                 }
  1123.             }else{seleccionando_skins[playerid][0] = false;CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");}
  1124.         }
  1125.  
  1126.         case DIALOG_ACTORS+13:{
  1127.             if(response){
  1128.                 switch(listitem){
  1129.                     case 3:{
  1130.                         if(!seleccionando_skins[playerid][1]){
  1131.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  1132.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: you have not selected any id for editing!."); }
  1133.  
  1134.                         if(seleccion_skis>=311) seleccion_skis=311;
  1135.                         else seleccion_skis++;
  1136.                         format(data,sizeof(data),"{FFFFFF}\n\t\t * displaying skin: [ %d / 311 ] \n\n\
  1137.                         \t\t{FF6800}>>: select your preferred option: \n\
  1138.                         option - skin'>>' \n\
  1139.                         option - skin'<<' \n\
  1140.                         option - skin'random'  \n",seleccion_skis);
  1141.                         ShowPlayerDialog(playerid, DIALOG_ACTORS+13, DIALOG_STYLE_LIST, "{FF6800}Editing system actors:", data, "select", "finish");
  1142.  
  1143.                         for(new xx=1; xx<cantidad_actores+1; xx++){
  1144.                             if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
  1145.                                 continue;
  1146.                             GetActorPos(InfoActorEdicion[xx][c_actor], pos[0],pos[1],pos[2]);
  1147.                             GetActorFacingAngle(InfoActorEdicion[xx][c_actor], pos[3]);
  1148.                             DestroyActor(InfoActorEdicion[xx][c_actor]);
  1149.                             InfoActorEdicion[xx][a_skin] = seleccion_skis;
  1150.                             InfoActorEdicion[xx][c_actor] = CreateActor(InfoActorEdicion[xx][a_skin], pos[0],pos[1],pos[2], pos[3]);
  1151.                         }
  1152.                     }
  1153.                     case 4:{
  1154.                         if(!seleccionando_skins[playerid][1]){
  1155.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  1156.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: you have not selected any id for editing!."); }
  1157.  
  1158.                         if(seleccion_skis<=0) seleccion_skis=0;
  1159.                         else seleccion_skis--;
  1160.                         format(data,sizeof(data),"{FFFFFF}\n\t\t * displaying skin: [ %d / 311 ] \n\n\
  1161.                         \t\t{FF6800}>>: select your preferred option: \n\
  1162.                         option - skin'>>' \n\
  1163.                         option - skin'<<' \n\
  1164.                         option - skin'random'  \n",seleccion_skis);
  1165.                         ShowPlayerDialog(playerid, DIALOG_ACTORS+13, DIALOG_STYLE_LIST, "{FF6800}Editing system actors:", data, "select", "finish");
  1166.  
  1167.                         for(new xx=1; xx<cantidad_actores+1; xx++){
  1168.                             if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
  1169.                                 continue;
  1170.                             GetActorPos(InfoActorEdicion[xx][c_actor], pos[0],pos[1],pos[2]);
  1171.                             GetActorFacingAngle(InfoActorEdicion[xx][c_actor], pos[3]);
  1172.                             DestroyActor(InfoActorEdicion[xx][c_actor]);
  1173.                             InfoActorEdicion[xx][a_skin] = seleccion_skis;
  1174.                             InfoActorEdicion[xx][c_actor] = CreateActor(InfoActorEdicion[xx][a_skin], pos[0],pos[1],pos[2], pos[3]);
  1175.                         }
  1176.                     }
  1177.                     case 5:{
  1178.                         if(!seleccionando_skins[playerid][1]){
  1179.                             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  1180.                             return SendClientMessage(playerid,-1,"{919BA4}INFO: you have not selected any id for editing!."); }
  1181.  
  1182.                         seleccion_skis=random(311);
  1183.                         format(data,sizeof(data),"{FFFFFF}\n\t\t * displaying skin: [ %d / 311 ] \n\n\
  1184.                         \t\t{FF6800}>>: select your preferred option: \n\
  1185.                         option - skin'>>' \n\
  1186.                         option - skin'<<' \n\
  1187.                         option - skin'random'  \n",seleccion_skis);
  1188.                         ShowPlayerDialog(playerid, DIALOG_ACTORS+13, DIALOG_STYLE_LIST, "{FF6800}Editing system actors:", data, "select", "finish");
  1189.  
  1190.                         for(new xx=1; xx<cantidad_actores+1; xx++){
  1191.                             if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
  1192.                                 continue;
  1193.                             GetActorPos(InfoActorEdicion[xx][c_actor], pos[0],pos[1],pos[2]);
  1194.                             GetActorFacingAngle(InfoActorEdicion[xx][c_actor], pos[3]);
  1195.                             DestroyActor(InfoActorEdicion[xx][c_actor]);
  1196.                             InfoActorEdicion[xx][a_skin] = seleccion_skis;
  1197.                             InfoActorEdicion[xx][c_actor] = CreateActor(InfoActorEdicion[xx][a_skin], pos[0],pos[1],pos[2], pos[3]);
  1198.                         }
  1199.                     }
  1200.                     default:{
  1201.                         format(data,sizeof(data),"{FFFFFF}\n\t\t * displaying skin: [ %d / 311 ] \n\n\
  1202.                         \t\t{FF6800}>>: select your preferred option: \n\
  1203.                         option - skin'>>' \n\
  1204.                         option - skin'<<' \n\
  1205.                         option - skin'random'  \n",seleccion_skis);
  1206.                         ShowPlayerDialog(playerid, DIALOG_ACTORS+13, DIALOG_STYLE_LIST, "{FF6800}Editing system actors:", data, "select", "finish");
  1207.                     }
  1208.                 }
  1209.             }else{seleccionando_skins[playerid][1] = false;CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");}
  1210.         }
  1211.  
  1212.         case DIALOG_ACTORS+14:{
  1213.             if(response){
  1214.                 if(strlen(inputtext)==10){
  1215.                     if(inputtext[0]=='0' && inputtext[1]=='x'){
  1216.                         InfoActorEdicion[id_seleccionado][color_actor] = HexToInt(inputtext);
  1217.                         format(data,sizeof(data),"%s:(id:%d)",InfoActorEdicion[id_seleccionado][a_name],id_seleccionado);
  1218.                         Update3DTextLabelText(InfoActorEdicion[id_seleccionado][label],InfoActorEdicion[id_seleccionado][color_actor],data);
  1219.  
  1220.                         format(data,sizeof(data),"{FFFFFF}INFO: do you changed the color of the name of the actor id:%d, correctamente!.", id_seleccionado);
  1221.                         SendClientMessage(playerid,-1,data);
  1222.                         format(data,sizeof(data),"{A50000}INFO: color is changed:: {%06x} 0x%08x", HexToInt(InfoActorEdicion[id_seleccionado][color_actor])>>>8, InfoActorEdicion[id_seleccionado][color_actor]);
  1223.                         SendClientMessage(playerid,-1,data);
  1224.                         CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  1225.                     }else{
  1226.                         ShowPlayerDialog(playerid, DIALOG_ACTORS+14, DIALOG_STYLE_INPUT, "{FF6800}Editing system actors:", "\
  1227.                         {FFFFFF}put the color you want to place the name of the actor: \n\
  1228.                         {A50000}(NOTE: The color format must be in 'hex' example: 0xFFFFFFFF \n\
  1229.                         ", "accept", "cancel");
  1230.                     }
  1231.                 }else{
  1232.                     ShowPlayerDialog(playerid, DIALOG_ACTORS+14, DIALOG_STYLE_INPUT, "{FF6800}Editing system actors:", "\
  1233.                     {FFFFFF}put the color you want to place the name of the actor: \n\
  1234.                     {A50000}(NOTE: The color format must be in 'hex' example: 0xFFFFFFFF \n\
  1235.                     ", "accept", "cancel");
  1236.                 }
  1237.             }else CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  1238.         }
  1239.  
  1240.         case DIALOG_ACTORS+15:{
  1241.             if(response){
  1242.                 if(strlen(inputtext)==10){
  1243.                     if(inputtext[0]=='0' && inputtext[1]=='x'){
  1244.                         for(new xx=1; xx<cantidad_actores+1; xx++){
  1245.                             if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
  1246.                                 continue;
  1247.                             InfoActorEdicion[xx][color_actor] = HexToInt(inputtext);
  1248.                             format(data,sizeof(data),"%s:(id:%d)",InfoActorEdicion[xx][a_name],xx);
  1249.                             Update3DTextLabelText(InfoActorEdicion[xx][label],InfoActorEdicion[xx][color_actor],data);
  1250.                         }
  1251.                         SendClientMessage(playerid,-1,"{FFFFFF}INFO: do you name changed color all actors created correctly!.");
  1252.                         format(data,sizeof(data),"{A50000}INFO: color is changed: {%06x} 0x%08x", HexToInt(inputtext)>>>8, HexToInt(inputtext));
  1253.                         SendClientMessage(playerid,-1,data);
  1254.                         CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  1255.                     }else{
  1256.                         ShowPlayerDialog(playerid, DIALOG_ACTORS+15, DIALOG_STYLE_INPUT, "{FF6800}Editing system actors:", "\
  1257.                         {FFFFFF}put the color you want to place the name of all players: \n\
  1258.                         {A50000}(NOTE: The color format must be in 'hex' example: 0xFFFFFFFF \n\
  1259.                         ", "accept", "cancel");
  1260.                     }
  1261.                 }else{
  1262.                     ShowPlayerDialog(playerid, DIALOG_ACTORS+15, DIALOG_STYLE_INPUT, "{FF6800}Editing system actors:", "\
  1263.                     {FFFFFF}put the color you want to place the name of all players: \n\
  1264.                     {A50000}(NOTE: The color format must be in 'hex' example: 0xFFFFFFFF \n\
  1265.                     ", "accept", "cancel");
  1266.                 }
  1267.             }else CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  1268.         }
  1269.  
  1270.         case DIALOG_ACTORS+16:{
  1271.             if(response){
  1272.                 tipo_archivo_a[playerid] = true;
  1273.                 ShowPlayerDialog(playerid, DIALOG_ACTORS+4, DIALOG_STYLE_INPUT, "{FF6800}Editing system actors:", "\
  1274.                 {FFFFFF}type an name for the file you saved actors created.\n\
  1275.                 {A50000}NOTE: You can use the 'default' to be applied\n\
  1276.                 the name {FFFFFF}'actors.0001' {A50000}(by counting the number will file created). ", "accept", "by default");
  1277.             }else{
  1278.                 tipo_archivo_a[playerid] = false;
  1279.                 ShowPlayerDialog(playerid, DIALOG_ACTORS+4, DIALOG_STYLE_INPUT, "{FF6800}Editing system actors:", "\
  1280.                 {FFFFFF}type an name for the file you saved actors created.\n\
  1281.                 {A50000}NOTE: You can use the 'default' to be applied\n\
  1282.                 the name {FFFFFF}'actors.0001' {A50000}(by counting the number will file created). ", "accept", "by default");
  1283.             }
  1284.         }
  1285.  
  1286.     }
  1287.     return false;
  1288. }
  1289.  
  1290. public OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ){
  1291.     new data[100];
  1292.     if(type == SELECT_OBJECT_GLOBAL_OBJECT){
  1293.         if(seleccioando_actor[playerid][0]){
  1294.             id_seleccionado = objectid;
  1295.             format(data,sizeof(data),"{FFFFFF}INFO: the actor id is established: id:%d", id_seleccionado);
  1296.             SendClientMessage(playerid,-1,data);
  1297.             CancelEdit(playerid);
  1298.             seleccioando_actor[playerid][0]=false;
  1299.             CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  1300.         }
  1301.         else if(seleccioando_actor[playerid][1]){
  1302.             id_seleccionado = objectid;
  1303.             format(data,sizeof(data),"{FFFFFF}INFO: the id of the selected actor is the: id:%d", id_seleccionado);
  1304.             SendClientMessage(playerid,-1,data);
  1305.             EditObject(playerid, InfoActorEdicion[id_seleccionado][objeto_select]);
  1306.             SendClientMessage(playerid,-1,"{EEE019}INFO: now moves to position the actor editing mode!.");
  1307.             SendClientMessage(playerid,-1,"{FFFFFF}INFO: to change the camera when you're in edit mode,");
  1308.             SendClientMessage(playerid,-1,"{FFFFFF}Keep the 'TAB' key and moving the 'mouse' to change!.");
  1309.             virtualword_actors = GetActorVirtualWorld(InfoActorEdicion[objectid][c_actor]);
  1310.             GetActorPos(InfoActorEdicion[objectid][c_actor], old_actors[0], old_actors[1], old_actors[2]);
  1311.             GetActorFacingAngle(InfoActorEdicion[objectid][c_actor], old_actors[3]);
  1312.         }
  1313.     }
  1314.     return true;
  1315. }
  1316.  
  1317. public OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ){
  1318.     new data[50];
  1319.     if(seleccioando_actor[playerid][1]){
  1320.         switch(response){
  1321.             // player moved the object (edition did not stop at all)
  1322.             case EDIT_RESPONSE_UPDATE:{
  1323.                 if(!playerobject){
  1324.                     SetObjectPos(InfoActorEdicion[objectid][objeto_select], fX, fY, fZ);
  1325.                     SetObjectRot(InfoActorEdicion[objectid][objeto_select], 0, 0, fRotZ);
  1326.                     DestroyActor(InfoActorEdicion[objectid][c_actor]);
  1327.                     InfoActorEdicion[objectid][c_actor] = CreateActor(InfoActorEdicion[objectid][a_skin], fX, fY, fZ, fRotZ);
  1328.                     Delete3DTextLabel(InfoActorEdicion[objectid][label]);
  1329.                     InfoActorEdicion[objectid][label] = Create3DTextLabel("_",-1,fX, fY, fZ+1,10,virtualword_actors,0);
  1330.                     format(data,sizeof(data),"%s:(id:%d)",InfoActorEdicion[objectid][a_name],objectid);
  1331.                     Update3DTextLabelText(InfoActorEdicion[objectid][label],InfoActorEdicion[objectid][color_actor],data);
  1332.                 }
  1333.             }
  1334.             // player clicked on save
  1335.             case EDIT_RESPONSE_FINAL:{
  1336.                 seleccioando_actor[playerid][1]=false;
  1337.                 SetObjectPos(InfoActorEdicion[objectid][objeto_select], fX, fY, fZ);
  1338.                 SetObjectRot(InfoActorEdicion[objectid][objeto_select], 0, 0, fRotZ);
  1339.                 DestroyActor(InfoActorEdicion[objectid][c_actor]);
  1340.                 InfoActorEdicion[objectid][c_actor] = CreateActor(InfoActorEdicion[objectid][a_skin], fX, fY, fZ, fRotZ);
  1341.                 Delete3DTextLabel(InfoActorEdicion[objectid][label]);
  1342.                 InfoActorEdicion[objectid][label] = Create3DTextLabel("_",-1,fX, fY, fZ+1,10,virtualword_actors,0);
  1343.                 format(data,sizeof(data),"%s:(id:%d)",InfoActorEdicion[objectid][a_name],objectid);
  1344.                 Update3DTextLabelText(InfoActorEdicion[objectid][label],InfoActorEdicion[objectid][color_actor],data);
  1345.                
  1346.                 SendClientMessage(playerid,-1,"{EEE019}INFO:beam finished editing the actor,");
  1347.                 SendClientMessage(playerid,-1,"{EEE019}it has established the new position actor!.");
  1348.                 CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  1349.             }
  1350.             // player cancelled (ESC)
  1351.             case EDIT_RESPONSE_CANCEL:{
  1352.                 if(!playerobject){
  1353.                     seleccioando_actor[playerid][1]=false;
  1354.                     SetObjectPos(InfoActorEdicion[objectid][objeto_select], old_actors[0], old_actors[1], old_actors[2]);
  1355.                     SetObjectRot(InfoActorEdicion[objectid][objeto_select], 0, 0, old_actors[3]);
  1356.                     DestroyActor(InfoActorEdicion[objectid][c_actor]);
  1357.                     InfoActorEdicion[objectid][c_actor] = CreateActor(InfoActorEdicion[objectid][a_skin], old_actors[0], old_actors[1], old_actors[2], old_actors[3]);
  1358.                     Delete3DTextLabel(InfoActorEdicion[objectid][label]);
  1359.                     InfoActorEdicion[objectid][label] = Create3DTextLabel("_",-1,old_actors[0], old_actors[1], old_actors[2]+1,10,virtualword_actors,0);
  1360.                     format(data,sizeof(data),"%s:(id:%d)",InfoActorEdicion[objectid][a_name],objectid);
  1361.                     Update3DTextLabelText(InfoActorEdicion[objectid][label],InfoActorEdicion[objectid][color_actor],data);
  1362.                    
  1363.                     SendClientMessage(playerid,-1,"{EEE019}INFO: You've canceled editing Actor,");
  1364.                     SendClientMessage(playerid,-1,"{EEE019}It has established her former position of the actor!.");
  1365.                     CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
  1366.                 }
  1367.             }
  1368.         }
  1369.     }
  1370. }
  1371.  
  1372. COMMAND:actorhelp(playerid, params[]){
  1373.     new
  1374.         data[2024];
  1375.     strcat(data,"{FFFFFF}INFO: use the following keys for editing actors: \n\n");
  1376.     strcat(data,"{FF6800}>>: key 'Y' to create an player in your position. \n");
  1377.     strcat(data,"{FF6800}>>: key 'N' to remove the actor created earlier. \n");
  1378.     strcat(data,"{FF6800}>>: key 'C' y 'ENTER' (both) to remove all creative players so far. \n");
  1379.     strcat(data,"{FF6800}>>: key 'C' y 'BAR' (both) to save all creative players so far. \n");
  1380.     strcat(data,"{FF6800}>>: key 'C' y 'H' (both) to start the dialog help. \n\n");
  1381.     strcat(data,"{FFFFFF}INFO: use the following commands for editing actors: \n\n");
  1382.     strcat(data,"{FF6800}>>: use the command '/actorfunction' to use the functions available \n");
  1383.     strcat(data,"{FF6800}>>: use the command '/actor' to turn on / off Editing system actors. \n");
  1384.     ShowPlayerDialog(playerid, DIALOG_ACTORS+0, DIALOG_STYLE_MSGBOX, "{FF6800}Editing system actors:", data, "close", "more...");
  1385.     return true;
  1386. }
  1387.  
  1388. COMMAND:actorfunction(playerid, params[]){
  1389.     if(IsPlayerInAnyVehicle(playerid))
  1390.         return SendClientMessage(playerid,-1,"{919BA4}INFO: You can not use the editor of actors from a vehicle!.");
  1391.    
  1392.     new
  1393.         data[2024];
  1394.     strcat(data,"OPTION \t comment \n");
  1395.     // NOTE: change the comment to your preference.
  1396.     strcat(data,"{FF6800}>>: {FFFFFF}establish an specific id.. \t{2C2E2E} created by OTACON.\n");
  1397.     strcat(data,"{FF6800}>>: {FFFFFF}animation to establish an specific id. \t{2C2E2E} created by OTACON.\n");
  1398.     strcat(data,"{FF6800}>>: {FFFFFF}establish an animation all actors. \t{2C2E2E} created by OTACON.\n");
  1399.     strcat(data,"{FF6800}>>: {FFFFFF}change the name to an specific actor. \t{2C2E2E} created by OTACON.\n");
  1400.     strcat(data,"{FF6800}>>: {FFFFFF}change the name to all actors. \t{2C2E2E} created by OTACON.\n");
  1401.     strcat(data,"{FF6800}>>: {FFFFFF}coach skins for the specific id. \t{2C2E2E} created by OTACON.\n");
  1402.     strcat(data,"{FF6800}>>: {FFFFFF}coach skins for all actors. \t{2C2E2E} created by OTACON.\n");
  1403.     strcat(data,"{FF6800}>>: {FFFFFF}change the color of the name for the specified id. \t{2C2E2E} created by OTACON.\n");
  1404.     strcat(data,"{FF6800}>>: {FFFFFF}change the color of the name for all actors. \t{2C2E2E} created by OTACON.\n");
  1405.     strcat(data,"{FF6800}>>: {FFFFFF}select an specific id. \t{2C2E2E} created by OTACON.\n");
  1406.     strcat(data,"{FF6800}>>: {FFFFFF}move to position an actor, selecting it. \t{2C2E2E} created by OTACON.\n");
  1407.     ShowPlayerDialog(playerid, DIALOG_ACTORS+11, DIALOG_STYLE_TABLIST_HEADERS,\
  1408.      "{FF6800}Editing system actors:", data, "select", "cancel");
  1409.     return true;
  1410. }
  1411.  
  1412. COMMAND:actor(playerid, params[]){
  1413.     if(IsPlayerInAnyVehicle(playerid))
  1414.         return SendClientMessage(playerid,-1,"{919BA4}INFO: You can not use the editor of actors from a vehicle!.");
  1415.  
  1416.     if(!creando_actors[playerid]){
  1417.         creando_actors[playerid]=true;
  1418.         SendClientMessage(playerid,-1,"{447900}INFO: actors creation system, on.");
  1419.         CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorhelp");
  1420.     }else{
  1421.         creando_actors[playerid]=false;
  1422.         SendClientMessage(playerid,-1,"{A50000}INFO: actors creation system, off.");
  1423.     }
  1424.     return true;
  1425. }
  1426.  
  1427. public OnFilterScriptInit(){
  1428.     AddPlayerClass(random(311),2074.5679,1208.1819,10.6719,2.4021,37,999999,38,999999,35,999999); //
  1429.     CreateVehicle(535, 2074.5679,1208.1819,10.6719,2.4021, random(200),random(200), 9999);
  1430.     return true;
  1431. }
  1432.  
  1433. stock HexToInt(string[]){
  1434.   if (string[0]==0) return 0;
  1435.   new i;
  1436.   new cur=1;
  1437.   new res=0;
  1438.   for (i=strlen(string);i>0;i--) {
  1439.     if (string[i-1]<58) res=res+cur*(string[i-1]-48); else res=res+cur*(string[i-1]-65+10);
  1440.     cur=cur*16;
  1441.   }return res;
  1442. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement