Advertisement
OtaconEvil

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

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