Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * ## LEASE ATENTAMENTE PARA NO CONVERTIRSE EN LAMMER!!.: :D ##
- *
- * Estè Simple FILTERSCRIPT esta hecho especialmente para www.forum.sa-mp.com
- * NO Publicar estè FILTERSCRIPT en Otros foros de SA-MP y hacerse pasar por el creador del CODE.
- *
- * Codigo Creado Por OTACON
- *
- * CREDITOS:
- * OTACON: Realizacion y Idea de creacion del code.
- * TÙ: Modificacion libremente respetando lo mencionado ;).
- *
- * NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;)
- *
- * Prohibido TOTALMENTE el Robo de Créditos o la
- * Publicación de este FILTERSCRIPT sin Mi Permiso.
- */
- /*
- * ## READ CAREFULLY TO AVOID BECOMING LAMMER!.: :D ##
- *
- * This simple FILTERSCRIPT is made especially for www.forum.sa-mp.com
- * DO NOT Post the FILTERSCRIPT in Other SAMP forums and impersonating the creator of the CODE.
- *
- * Code Created By OTACON
- *
- * CREDITS:
- * OTACON: Idea Making and code creation.
- * YOUR: Modification freely respecting the above ;).
- *
- * NOTE: Less Credits for those who criticize me.. JO'PUTAS! :D xD ;)
- *
- * FULLY spaces Theft Credit or
- * Publication of this FILTERSCRIPT without my permission.
- */
- #include <a_samp>
- #include <zcmd>
- #include <sscanf2>
- /*
- [img]http://i.imgur.com/Bsxggc1.png[/img]
- [img]http://i.imgur.com/b9j4LtE.png[/img]
- [img]http://i.imgur.com/0Pw63AP.png[/img]
- */
- #define DIALOG_ACTORS (17)
- enum e_actor{
- objeto_select,
- color_actor,
- a_name[25],
- a_skin,
- c_actor,
- bool:i_actor,
- Float:h_actor,
- a_animlib[32],
- a_animname[32],
- Text3D:label };
- new InfoActorEdicion[MAX_ACTORS][e_actor],
- cantidad_actores=0,
- cantidad_archivos=0,
- id_seleccionado=0,
- Float:vida_id=0.0,
- seleccion_skis=0,
- bool:actor_Invulnerable,
- bool:seleccionando_skins[MAX_PLAYERS][2],
- bool:creando_actors[MAX_PLAYERS],
- bool:tipo_archivo_a[MAX_PLAYERS],
- bool:seleccioando_actor[MAX_PLAYERS][2];
- static Float:old_actors[4], virtualword_actors;
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){
- new
- Float:pos[4],
- data[144];
- GetPlayerPos(playerid, pos[0],pos[1],pos[2]);
- GetPlayerFacingAngle(playerid, pos[3]);
- if(newkeys & KEY_YES){
- if(creando_actors[playerid]){
- if(IsPlayerInAnyVehicle(playerid))
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no puedes utilizar el editor de actores desde un vehiculo!.");
- if(cantidad_actores>=MAX_ACTORS)
- return SendClientMessage(playerid,-1,"{919BA4}INFO: hay demasiados actores creados hasta el momento!.");
- ShowPlayerDialog(playerid, DIALOG_ACTORS+1, DIALOG_STYLE_MSGBOX, "{FF6800}Sistema de edicion de actores:", "\
- {FFFFFF}¿Que vulnerabilidad deseas aplicarle al actor?", "vulnerable", "invulnerable");
- }
- }
- if(newkeys & KEY_NO){
- if(creando_actors[playerid]){
- if(IsPlayerInAnyVehicle(playerid))
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no puedes utilizar el editor de actores desde un vehiculo!.");
- if(cantidad_actores<=0)
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no hay ningun actor creado hasta el momento!.");
- if(!IsValidActor(InfoActorEdicion[cantidad_actores][c_actor]))
- return false;
- DestroyActor(InfoActorEdicion[cantidad_actores][c_actor]);
- Delete3DTextLabel(InfoActorEdicion[cantidad_actores][label]);
- InfoActorEdicion[cantidad_actores][a_skin] = 0;
- InfoActorEdicion[cantidad_actores][c_actor] = 0;
- InfoActorEdicion[cantidad_actores][i_actor] = false;
- InfoActorEdicion[cantidad_actores][h_actor] = 0.0;
- InfoActorEdicion[cantidad_actores][color_actor] = -1;
- format(InfoActorEdicion[cantidad_actores][a_animlib],32,"%s","null");
- format(InfoActorEdicion[cantidad_actores][a_animname],32,"%s","null");
- format(InfoActorEdicion[cantidad_actores][a_name],24,"%s","Actor");
- DestroyObject(InfoActorEdicion[cantidad_actores][objeto_select]);
- cantidad_actores--;
- format(data,sizeof(data),"{EEE019}INFO: haz eliminado un actor correctamente!. actores creados en total: [%d/%d].",cantidad_actores,MAX_ACTORS);
- SendClientMessage(playerid,-1,data);
- }
- }
- if(newkeys & KEY_CROUCH && newkeys & KEY_SECONDARY_ATTACK){
- if(creando_actors[playerid]){
- if(IsPlayerInAnyVehicle(playerid))
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no puedes utilizar el editor de actores desde un vehiculo!.");
- if(cantidad_actores<=0)
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no hay ningun actor creado hasta el momento!.");
- for(new xx=0; xx<cantidad_actores+1; xx++){
- if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
- continue;
- DestroyActor(InfoActorEdicion[xx][c_actor]);
- Delete3DTextLabel(InfoActorEdicion[xx][label]);
- InfoActorEdicion[xx][a_skin] = 0;
- InfoActorEdicion[xx][c_actor] = 0;
- InfoActorEdicion[xx][i_actor] = false;
- InfoActorEdicion[xx][h_actor] = 0.0;
- InfoActorEdicion[xx][color_actor] = -1;
- format(InfoActorEdicion[xx][a_animlib],32,"%s","null");
- format(InfoActorEdicion[xx][a_animname],32,"%s","null");
- format(InfoActorEdicion[xx][a_name],24,"%s","Actor");
- DestroyObject(InfoActorEdicion[xx][objeto_select]);
- }
- cantidad_actores=0;
- format(data,sizeof(data),"{EEE019}INFO: haz eliminado todos los actores correctamente!. actores creados en total: [%d/%d].",cantidad_actores,MAX_ACTORS);
- SendClientMessage(playerid,-1,data);
- }
- }
- if(newkeys & KEY_CROUCH && newkeys & KEY_SPRINT){
- if(creando_actors[playerid]){
- if(IsPlayerInAnyVehicle(playerid))
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no puedes utilizar el editor de actores desde un vehiculo!.");
- if(cantidad_actores<=0)
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no hay ningun actor creado hasta el momento!.");
- ShowPlayerDialog(playerid, DIALOG_ACTORS+16, DIALOG_STYLE_MSGBOX, "{FF6800}Sistema de edicion de actores:", "\
- {FFFFFF}elige el tipo de archivo que quieres guardar los actores:", "normal", "filterscript");
- }
- }
- if(newkeys & KEY_CROUCH && newkeys & KEY_CTRL_BACK)
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorhelp");
- return true;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){
- new
- animlib[32],
- animname[32],
- Float:pos[4],
- data[300],
- datos[144],
- File:archivos,
- Float:health,
- virtualword;
- GetPlayerPos(playerid, pos[0],pos[1],pos[2]);
- GetPlayerFacingAngle(playerid, pos[3]);
- virtualword = GetPlayerVirtualWorld(playerid);
- switch(dialogid){
- case DIALOG_ACTORS+0:{
- if(!response)
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- }
- case DIALOG_ACTORS+1:{
- if(response){
- actor_Invulnerable = false;
- ShowPlayerDialog(playerid, DIALOG_ACTORS+2, DIALOG_STYLE_MSGBOX, "{FF6800}Sistema de edicion de actores:", "\
- {FFFFFF}¿Que opcion de vida deseas aplicarle al actor?", "personalizar", "por defecto");
- }else{
- actor_Invulnerable = true;
- ShowPlayerDialog(playerid, DIALOG_ACTORS+2, DIALOG_STYLE_MSGBOX, "{FF6800}Sistema de edicion de actores:", "\
- {FFFFFF}¿Que opcion de vida deseas aplicarle al actor?", "personalizar", "por defecto");
- }
- }
- case DIALOG_ACTORS+2:{
- if(response){
- ShowPlayerDialog(playerid, DIALOG_ACTORS+3, DIALOG_STYLE_INPUT, "{FF6800}Sistema de edicion de actores:", "\
- {FFFFFF}escribe la cantidad de vida que tendra el actor, debe ser mayor a 0, y menor o igual a 100.\n\
- {A50000}NOTA: puedes utilizar la opcion 'por defecto' que se le aplicara 100 automaticamente. ", "aceptar", "por defecto");
- }else{
- vida_id = 100.0;
- ShowPlayerDialog(playerid, DIALOG_ACTORS+7, DIALOG_STYLE_MSGBOX, "{FF6800}Sistema de edicion de actores:", "\
- {FFFFFF}¿Que opcion de skin deseas aplicarle al actor?", "personalizar", "por defecto");
- }
- }
- case DIALOG_ACTORS+3:{
- if(response){
- new Float:valor;
- if(!sscanf(inputtext, "f", valor)){
- if(valor>=0 && valor<=100){
- vida_id = valor;
- ShowPlayerDialog(playerid, DIALOG_ACTORS+7, DIALOG_STYLE_MSGBOX, "{FF6800}Sistema de edicion de actores:", "\
- {FFFFFF}¿Que opcion de skin deseas aplicarle al actor?", "personalizar", "por defecto");
- }else{
- ShowPlayerDialog(playerid, DIALOG_ACTORS+3, DIALOG_STYLE_INPUT, "{FF6800}Sistema de edicion de actores:", "\
- {FFFFFF}escribe la cantidad de vida que tendra el actor, debe ser mayor a 0, y menor o igual a 100.\n\
- {A50000}NOTA: puedes utilizar la opcion 'por defecto' que se le aplicara 100 automaticamente. ", "aceptar", "por defecto");
- }
- }else{
- ShowPlayerDialog(playerid, DIALOG_ACTORS+3, DIALOG_STYLE_INPUT, "{FF6800}Sistema de edicion de actores:", "\
- {FFFFFF}escribe la cantidad de vida que tendra el actor, debe ser mayor a 0, y menor o igual a 100.\n\
- {A50000}NOTA: puedes utilizar la opcion 'por defecto' que se le aplicara 100 automaticamente. ", "aceptar", "por defecto");
- }
- }else{
- vida_id = 100.0;
- ShowPlayerDialog(playerid, DIALOG_ACTORS+7, DIALOG_STYLE_MSGBOX, "{FF6800}Sistema de edicion de actores:", "\
- {FFFFFF}¿Que opcion de skin deseas aplicarle al actor?", "personalizar", "por defecto");
- }
- }
- case DIALOG_ACTORS+4:{
- if(response){
- new opcion[100];
- if(!sscanf(inputtext, "s[100]", opcion)){
- format(data,sizeof(data),"%s.%s",opcion, (tipo_archivo_a[playerid])?("txt"):("pwn") );
- if(fexist(data))fremove(data);
- archivos=fopen(data, io_readwrite);
- if(archivos){
- if(tipo_archivo_a[playerid]){
- fwrite(archivos, "\r\n/**** Sistema de edicion de actores - By OTACON ****/\r\n");
- format(datos,sizeof(datos)," new actorid[%d];\r\n", cantidad_actores+1);
- fwrite(archivos, datos);
- format(datos,sizeof(datos)," new Text3D:text_actor[%d];\r\n\r\n\r\n", cantidad_actores+1);
- fwrite(archivos, datos);
- for(new xx=1; xx<cantidad_actores+1; xx++){
- if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
- continue;
- GetActorPos(InfoActorEdicion[xx][c_actor], pos[0],pos[1],pos[2]);
- GetActorFacingAngle(InfoActorEdicion[xx][c_actor], pos[3]);
- 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]);
- fwrite(archivos, datos);
- }
- fwrite(archivos, "\r\n new data[144];\r\n");
- for(new xx=1; xx<cantidad_actores+1; xx++){
- if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
- continue;
- GetActorPos(InfoActorEdicion[xx][c_actor], pos[0],pos[1],pos[2]);
- virtualword = GetActorVirtualWorld(playerid);
- 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);
- fwrite(archivos, datos);
- format(datos,sizeof(datos)," format(data,sizeof(data),\"%s:%s\",actorid[%d]);\r\n",InfoActorEdicion[xx][a_name],"(id:%d)",xx);
- fwrite(archivos, datos);
- format(datos,sizeof(datos)," Update3DTextLabelText(text_actor[%d],0x%08x,data);\r\n\r\n",xx,InfoActorEdicion[xx][color_actor]);
- fwrite(archivos, datos);
- }
- for(new xx=1; xx<cantidad_actores+1; xx++){
- if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
- continue;
- GetActorFacingAngle(InfoActorEdicion[xx][c_actor], pos[3]);
- virtualword = GetActorVirtualWorld(playerid);
- GetActorHealth(InfoActorEdicion[xx][c_actor], health);
- format(datos,sizeof(datos)," SetActorFacingAngle(actorid[%d], %f);\r\n", xx,pos[3]);
- fwrite(archivos, datos);
- format(datos,sizeof(datos)," SetActorVirtualWorld(actorid[%d], %d);\r\n", xx,virtualword);
- fwrite(archivos, datos);
- format(datos,sizeof(datos)," SetActorInvulnerable(actorid[%d], %s);\r\n", xx, (!InfoActorEdicion[xx][i_actor])?("false"):("true") );
- fwrite(archivos, datos);
- format(datos,sizeof(datos)," SetActorHealth(actorid[%d], %f);\r\n", xx,InfoActorEdicion[xx][h_actor]);
- fwrite(archivos, datos);
- 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]);
- fwrite(archivos, datos);
- fwrite(archivos, " // NOTA: cambiar los parametros: (Float:fDelta, loop, lockx, locky, freeze, time) \r\n");
- fwrite(archivos, " // https://wiki.sa-mp.com/wiki/ApplyActorAnimation \r\n\r\n");
- }
- fwrite(archivos, "\r\n/* * MAS FUNCIONES...: \r\n\r\n");
- fwrite(archivos, " GetActorPos => https://wiki.sa-mp.com/wiki/GetActorPos \r\n");
- fwrite(archivos, " GetActorVirtualWorld => https://wiki.sa-mp.com/wiki/GetActorVirtualWorld \r\n");
- fwrite(archivos, " GetPlayerTargetActor => https://wiki.sa-mp.com/wiki/GetPlayerTargetActor \r\n");
- fwrite(archivos, " IsActorInvulnerable => https://wiki.sa-mp.com/wiki/IsActorInvulnerable \r\n");
- fwrite(archivos, " IsActorStreamedIn => https://wiki.sa-mp.com/wiki/IsActorStreamedIn \r\n");
- fwrite(archivos, " IsValidActor => https://wiki.sa-mp.com/wiki/IsValidActor \r\n");
- fwrite(archivos, " OnActorStreamIn => https://wiki.sa-mp.com/wiki/OnActorStreamIn \r\n");
- fwrite(archivos, " OnActorStreamOut => https://wiki.sa-mp.com/wiki/OnActorStreamOut \r\n");
- fwrite(archivos, " OnPlayerGiveDamageActor => https://wiki.sa-mp.com/wiki/OnPlayerGiveDamageActor \r\n");
- fwrite(archivos, " SetActorFacingAngle => https://wiki.sa-mp.com/wiki/SetActorFacingAngle \r\n");
- fwrite(archivos, " SetActorHealth => https://wiki.sa-mp.com/wiki/SetActorHealth \r\n");
- fwrite(archivos, " SetActorInvulnerable => https://wiki.sa-mp.com/wiki/SetActorInvulnerable \r\n");
- fwrite(archivos, " SetActorPos => https://wiki.sa-mp.com/wiki/SetActorPos \r\n");
- fwrite(archivos, " SetActorVirtualWorld => https://wiki.sa-mp.com/wiki/SetActorVirtualWorld \r\n");
- fwrite(archivos, " ApplyActorAnimation => https://wiki.sa-mp.com/wiki/ApplyActorAnimation \r\n");
- fwrite(archivos, " ClearActorAnimations => https://wiki.sa-mp.com/wiki/ClearActorAnimations \r\n");
- fwrite(archivos, " CreateActor => https://wiki.sa-mp.com/wiki/CreateActor \r\n");
- fwrite(archivos, " DestroyActor => https://wiki.sa-mp.com/wiki/DestroyActor \r\n");
- fwrite(archivos, " GetActorFacingAngle => https://wiki.sa-mp.com/wiki/GetActorFacingAngle \r\n");
- fwrite(archivos, " GetActorHealth => https://wiki.sa-mp.com/wiki/GetActorHealth \r\n");
- fwrite(archivos, " GetActorPoolSize => https://wiki.sa-mp.com/wiki/GetActorPoolSize \r\n\r\n");
- fwrite(archivos, "*/ \r\n\r\n");
- fwrite(archivos, "/**** Sistema de edicion de actores - By OTACON ****/\r\n\r\n");
- fclose(archivos);
- }else{
- fwrite(archivos, "\r\n/**** Sistema de edicion de actores - By OTACON ****/\r\n");
- fwrite(archivos, "#include <a_samp>\r\n\r\n");
- format(datos,sizeof(datos),"new actorid[%d];\r\n", cantidad_actores+1);
- fwrite(archivos, datos);
- format(datos,sizeof(datos),"new Text3D:text_actor[%d];\r\n\r\n", cantidad_actores+1);
- fwrite(archivos, datos);
- fwrite(archivos, "public OnFilterScriptInit(){\r\n\r\n");
- for(new xx=1; xx<cantidad_actores+1; xx++){
- if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
- continue;
- GetActorPos(InfoActorEdicion[xx][c_actor], pos[0],pos[1],pos[2]);
- GetActorFacingAngle(InfoActorEdicion[xx][c_actor], pos[3]);
- 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]);
- fwrite(archivos, datos);
- }
- fwrite(archivos, "\r\n new data[144];\r\n");
- for(new xx=1; xx<cantidad_actores+1; xx++){
- if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
- continue;
- GetActorPos(InfoActorEdicion[xx][c_actor], pos[0],pos[1],pos[2]);
- virtualword = GetActorVirtualWorld(playerid);
- 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);
- fwrite(archivos, datos);
- format(datos,sizeof(datos)," format(data,sizeof(data),\"%s:%s\",actorid[%d]);\r\n",InfoActorEdicion[xx][a_name],"(id:%d)",xx);
- fwrite(archivos, datos);
- format(datos,sizeof(datos)," Update3DTextLabelText(text_actor[%d],0x%08x,data);\r\n\r\n",xx,InfoActorEdicion[xx][color_actor]);
- fwrite(archivos, datos);
- }
- for(new xx=1; xx<cantidad_actores+1; xx++){
- if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
- continue;
- GetActorFacingAngle(InfoActorEdicion[xx][c_actor], pos[3]);
- virtualword = GetActorVirtualWorld(playerid);
- GetActorHealth(InfoActorEdicion[xx][c_actor], health);
- format(datos,sizeof(datos)," SetActorFacingAngle(actorid[%d], %f);\r\n", xx,pos[3]);
- fwrite(archivos, datos);
- format(datos,sizeof(datos)," SetActorVirtualWorld(actorid[%d], %d);\r\n", xx,virtualword);
- fwrite(archivos, datos);
- format(datos,sizeof(datos)," SetActorInvulnerable(actorid[%d], %s);\r\n", xx, (!InfoActorEdicion[xx][i_actor])?("false"):("true") );
- fwrite(archivos, datos);
- format(datos,sizeof(datos)," SetActorHealth(actorid[%d], %f);\r\n", xx,InfoActorEdicion[xx][h_actor]);
- fwrite(archivos, datos);
- 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]);
- fwrite(archivos, datos);
- fwrite(archivos, " // NOTA: cambiar los parametros: (Float:fDelta, loop, lockx, locky, freeze, time) \r\n");
- fwrite(archivos, " // https://wiki.sa-mp.com/wiki/ApplyActorAnimation \r\n\r\n");
- }
- fwrite(archivos, " return true;\r\n");
- fwrite(archivos, "}\r\n\r\n");
- fwrite(archivos, "public OnPlayerGiveDamageActor(playerid, damaged_actorid, Float: amount, weaponid, bodypart){\r\n\r\n");
- fwrite(archivos, " new\r\n");
- fwrite(archivos, " Float:health;\r\n");
- fwrite(archivos, " GetActorHealth(actorid[damaged_actorid], health);\r\n");
- fwrite(archivos, " if(IsValidActor(actorid[damaged_actorid])){\r\n");
- fwrite(archivos, " if(!IsActorInvulnerable(actorid[damaged_actorid])){\r\n");
- fwrite(archivos, " SetActorHealth(actorid[damaged_actorid], (health-amount));\r\n");
- fwrite(archivos, " if(health<=0.0){\r\n");
- fwrite(archivos, " SetActorHealth(actorid[damaged_actorid], 100.0);\r\n");
- fwrite(archivos, " }\r\n");
- fwrite(archivos, " }\r\n");
- fwrite(archivos, " }\r\n\r\n");
- fwrite(archivos, " return true;\r\n");
- fwrite(archivos, "}\r\n\r\n");
- fwrite(archivos, "/* * MAS FUNCIONES...: \r\n\r\n");
- fwrite(archivos, " GetActorPos => https://wiki.sa-mp.com/wiki/GetActorPos \r\n");
- fwrite(archivos, " GetActorVirtualWorld => https://wiki.sa-mp.com/wiki/GetActorVirtualWorld \r\n");
- fwrite(archivos, " GetPlayerTargetActor => https://wiki.sa-mp.com/wiki/GetPlayerTargetActor \r\n");
- fwrite(archivos, " IsActorInvulnerable => https://wiki.sa-mp.com/wiki/IsActorInvulnerable \r\n");
- fwrite(archivos, " IsActorStreamedIn => https://wiki.sa-mp.com/wiki/IsActorStreamedIn \r\n");
- fwrite(archivos, " IsValidActor => https://wiki.sa-mp.com/wiki/IsValidActor \r\n");
- fwrite(archivos, " OnActorStreamIn => https://wiki.sa-mp.com/wiki/OnActorStreamIn \r\n");
- fwrite(archivos, " OnActorStreamOut => https://wiki.sa-mp.com/wiki/OnActorStreamOut \r\n");
- fwrite(archivos, " OnPlayerGiveDamageActor => https://wiki.sa-mp.com/wiki/OnPlayerGiveDamageActor \r\n");
- fwrite(archivos, " SetActorFacingAngle => https://wiki.sa-mp.com/wiki/SetActorFacingAngle \r\n");
- fwrite(archivos, " SetActorHealth => https://wiki.sa-mp.com/wiki/SetActorHealth \r\n");
- fwrite(archivos, " SetActorInvulnerable => https://wiki.sa-mp.com/wiki/SetActorInvulnerable \r\n");
- fwrite(archivos, " SetActorPos => https://wiki.sa-mp.com/wiki/SetActorPos \r\n");
- fwrite(archivos, " SetActorVirtualWorld => https://wiki.sa-mp.com/wiki/SetActorVirtualWorld \r\n");
- fwrite(archivos, " ApplyActorAnimation => https://wiki.sa-mp.com/wiki/ApplyActorAnimation \r\n");
- fwrite(archivos, " ClearActorAnimations => https://wiki.sa-mp.com/wiki/ClearActorAnimations \r\n");
- fwrite(archivos, " CreateActor => https://wiki.sa-mp.com/wiki/CreateActor \r\n");
- fwrite(archivos, " DestroyActor => https://wiki.sa-mp.com/wiki/DestroyActor \r\n");
- fwrite(archivos, " GetActorFacingAngle => https://wiki.sa-mp.com/wiki/GetActorFacingAngle \r\n");
- fwrite(archivos, " GetActorHealth => https://wiki.sa-mp.com/wiki/GetActorHealth \r\n");
- fwrite(archivos, " GetActorPoolSize => https://wiki.sa-mp.com/wiki/GetActorPoolSize \r\n\r\n");
- fwrite(archivos, "*/ \r\n\r\n");
- fwrite(archivos, "/**** Sistema de edicion de actores - By OTACON ****/\r\n\r\n");
- fclose(archivos);
- }
- format(data,sizeof(data),"{005BA1}INFO: haz guardado todos los actores correctamente!. actores creados en total: [%d/%d].",cantidad_actores,MAX_ACTORS);
- SendClientMessage(playerid,-1,data);
- format(data,sizeof(data),"{005BA1}INFO: todos los actores se han guardado en el archivo: '%s.txt', en 'scriptfiles'.",opcion);
- SendClientMessage(playerid,-1,data);
- SendClientMessage(playerid,-1,"{EEE019}INFO: se ha reiniciado el editor, todos los actores han sido eliminados!.");
- for(new xx=1; xx<cantidad_actores+1; xx++){
- if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
- continue;
- DestroyActor(InfoActorEdicion[xx][c_actor]);
- Delete3DTextLabel(InfoActorEdicion[xx][label]);
- InfoActorEdicion[xx][a_skin] = 0;
- InfoActorEdicion[xx][c_actor] = 0;
- InfoActorEdicion[xx][i_actor] = false;
- InfoActorEdicion[xx][h_actor] = 0.0;
- InfoActorEdicion[xx][color_actor] = -1;
- format(InfoActorEdicion[xx][a_animlib],32,"%s","null");
- format(InfoActorEdicion[xx][a_animname],32,"%s","null");
- format(InfoActorEdicion[xx][a_name],24,"%s","Actor");
- DestroyObject(InfoActorEdicion[xx][objeto_select]);
- }
- cantidad_actores=0;
- }
- }else{
- ShowPlayerDialog(playerid, DIALOG_ACTORS+4, DIALOG_STYLE_INPUT, "{FF6800}Sistema de edicion de actores:", "\
- {FFFFFF}escribe un nombre para el archivo que guardara los actores creados.\n\
- {A50000}NOTA: puedes utilizar la opcion 'por defecto' que se le aplicara\n\
- el nombre {FFFFFF}'actors.0001' {A50000}(el numero va contando por archivo creados). ", "aceptar", "por defecto");
- }
- }else{
- format(data,sizeof(data),"actors.%04d.%s",cantidad_archivos, (tipo_archivo_a[playerid])?("txt"):("pwn") );
- if(fexist(data))fremove(data);
- archivos=fopen(data, io_readwrite);
- if(archivos){
- if(tipo_archivo_a[playerid]){
- fwrite(archivos, "\r\n/**** Sistema de edicion de actores - By OTACON ****/\r\n");
- format(datos,sizeof(datos)," new actorid[%d];\r\n", cantidad_actores+1);
- fwrite(archivos, datos);
- format(datos,sizeof(datos)," new Text3D:text_actor[%d];\r\n\r\n", cantidad_actores+1);
- fwrite(archivos, datos);
- for(new xx=1; xx<cantidad_actores+1; xx++){
- if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
- continue;
- GetActorPos(InfoActorEdicion[xx][c_actor], pos[0],pos[1],pos[2]);
- GetActorFacingAngle(InfoActorEdicion[xx][c_actor], pos[3]);
- 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]);
- fwrite(archivos, datos);
- }
- fwrite(archivos, "\r\n new data[144];\r\n");
- for(new xx=1; xx<cantidad_actores+1; xx++){
- if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
- continue;
- GetActorPos(InfoActorEdicion[xx][c_actor], pos[0],pos[1],pos[2]);
- virtualword = GetActorVirtualWorld(playerid);
- 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);
- fwrite(archivos, datos);
- format(datos,sizeof(datos)," format(data,sizeof(data),\"%s:%s\",actorid[%d]);\r\n",InfoActorEdicion[xx][a_name],"(id:%d)",xx);
- fwrite(archivos, datos);
- format(datos,sizeof(datos)," Update3DTextLabelText(text_actor[%d],0x%08x,data);\r\n\r\n",xx,InfoActorEdicion[xx][color_actor]);
- fwrite(archivos, datos);
- }
- for(new xx=1; xx<cantidad_actores+1; xx++){
- if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
- continue;
- GetActorFacingAngle(InfoActorEdicion[xx][c_actor], pos[3]);
- virtualword = GetActorVirtualWorld(playerid);
- GetActorHealth(InfoActorEdicion[xx][c_actor], health);
- format(datos,sizeof(datos)," SetActorFacingAngle(actorid[%d], %f);\r\n", xx,pos[3]);
- fwrite(archivos, datos);
- format(datos,sizeof(datos)," SetActorVirtualWorld(actorid[%d], %d);\r\n", xx,virtualword);
- fwrite(archivos, datos);
- format(datos,sizeof(datos)," SetActorInvulnerable(actorid[%d], %s);\r\n", xx, (!InfoActorEdicion[xx][i_actor])?("false"):("true") );
- fwrite(archivos, datos);
- format(datos,sizeof(datos)," SetActorHealth(actorid[%d], %f);\r\n", xx,InfoActorEdicion[xx][h_actor]);
- fwrite(archivos, datos);
- 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]);
- fwrite(archivos, datos);
- fwrite(archivos, " // NOTA: cambiar los parametros: (Float:fDelta, loop, lockx, locky, freeze, time) \r\n");
- fwrite(archivos, " // https://wiki.sa-mp.com/wiki/ApplyActorAnimation \r\n\r\n");
- }
- fwrite(archivos, "\r\n/* * MAS FUNCIONES...: \r\n\r\n");
- fwrite(archivos, " GetActorPos => https://wiki.sa-mp.com/wiki/GetActorPos \r\n");
- fwrite(archivos, " GetActorVirtualWorld => https://wiki.sa-mp.com/wiki/GetActorVirtualWorld \r\n");
- fwrite(archivos, " GetPlayerTargetActor => https://wiki.sa-mp.com/wiki/GetPlayerTargetActor \r\n");
- fwrite(archivos, " IsActorInvulnerable => https://wiki.sa-mp.com/wiki/IsActorInvulnerable \r\n");
- fwrite(archivos, " IsActorStreamedIn => https://wiki.sa-mp.com/wiki/IsActorStreamedIn \r\n");
- fwrite(archivos, " IsValidActor => https://wiki.sa-mp.com/wiki/IsValidActor \r\n");
- fwrite(archivos, " OnActorStreamIn => https://wiki.sa-mp.com/wiki/OnActorStreamIn \r\n");
- fwrite(archivos, " OnActorStreamOut => https://wiki.sa-mp.com/wiki/OnActorStreamOut \r\n");
- fwrite(archivos, " OnPlayerGiveDamageActor => https://wiki.sa-mp.com/wiki/OnPlayerGiveDamageActor \r\n");
- fwrite(archivos, " SetActorFacingAngle => https://wiki.sa-mp.com/wiki/SetActorFacingAngle \r\n");
- fwrite(archivos, " SetActorHealth => https://wiki.sa-mp.com/wiki/SetActorHealth \r\n");
- fwrite(archivos, " SetActorInvulnerable => https://wiki.sa-mp.com/wiki/SetActorInvulnerable \r\n");
- fwrite(archivos, " SetActorPos => https://wiki.sa-mp.com/wiki/SetActorPos \r\n");
- fwrite(archivos, " SetActorVirtualWorld => https://wiki.sa-mp.com/wiki/SetActorVirtualWorld \r\n");
- fwrite(archivos, " ApplyActorAnimation => https://wiki.sa-mp.com/wiki/ApplyActorAnimation \r\n");
- fwrite(archivos, " ClearActorAnimations => https://wiki.sa-mp.com/wiki/ClearActorAnimations \r\n");
- fwrite(archivos, " CreateActor => https://wiki.sa-mp.com/wiki/CreateActor \r\n");
- fwrite(archivos, " DestroyActor => https://wiki.sa-mp.com/wiki/DestroyActor \r\n");
- fwrite(archivos, " GetActorFacingAngle => https://wiki.sa-mp.com/wiki/GetActorFacingAngle \r\n");
- fwrite(archivos, " GetActorHealth => https://wiki.sa-mp.com/wiki/GetActorHealth \r\n");
- fwrite(archivos, " GetActorPoolSize => https://wiki.sa-mp.com/wiki/GetActorPoolSize \r\n\r\n");
- fwrite(archivos, "*/ \r\n\r\n");
- fwrite(archivos, "/**** Sistema de edicion de actores - By OTACON ****/\r\n\r\n");
- fclose(archivos);
- }else{
- fwrite(archivos, "\r\n/**** Sistema de edicion de actores - By OTACON ****/\r\n");
- fwrite(archivos, "#include <a_samp>\r\n\r\n");
- format(datos,sizeof(datos),"new actorid[%d];\r\n", cantidad_actores+1);
- fwrite(archivos, datos);
- format(datos,sizeof(datos),"new Text3D:text_actor[%d];\r\n\r\n", cantidad_actores+1);
- fwrite(archivos, datos);
- fwrite(archivos, "public OnFilterScriptInit(){\r\n\r\n");
- for(new xx=1; xx<cantidad_actores+1; xx++){
- if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
- continue;
- GetActorPos(InfoActorEdicion[xx][c_actor], pos[0],pos[1],pos[2]);
- GetActorFacingAngle(InfoActorEdicion[xx][c_actor], pos[3]);
- 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]);
- fwrite(archivos, datos);
- }
- fwrite(archivos, "\r\n new data[144];\r\n");
- for(new xx=1; xx<cantidad_actores+1; xx++){
- if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
- continue;
- GetActorPos(InfoActorEdicion[xx][c_actor], pos[0],pos[1],pos[2]);
- virtualword = GetActorVirtualWorld(playerid);
- 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);
- fwrite(archivos, datos);
- format(datos,sizeof(datos)," format(data,sizeof(data),\"%s:%s\",actorid[%d]);\r\n",InfoActorEdicion[xx][a_name],"(id:%d)",xx);
- fwrite(archivos, datos);
- format(datos,sizeof(datos)," Update3DTextLabelText(text_actor[%d],0x%08x,data);\r\n\r\n",xx,InfoActorEdicion[xx][color_actor]);
- fwrite(archivos, datos);
- }
- for(new xx=1; xx<cantidad_actores+1; xx++){
- if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
- continue;
- GetActorFacingAngle(InfoActorEdicion[xx][c_actor], pos[3]);
- virtualword = GetActorVirtualWorld(playerid);
- GetActorHealth(InfoActorEdicion[xx][c_actor], health);
- format(datos,sizeof(datos)," SetActorFacingAngle(actorid[%d], %f);\r\n", xx,pos[3]);
- fwrite(archivos, datos);
- format(datos,sizeof(datos)," SetActorVirtualWorld(actorid[%d], %d);\r\n", xx,virtualword);
- fwrite(archivos, datos);
- format(datos,sizeof(datos)," SetActorInvulnerable(actorid[%d], %s);\r\n", xx, (!InfoActorEdicion[xx][i_actor])?("false"):("true") );
- fwrite(archivos, datos);
- format(datos,sizeof(datos)," SetActorHealth(actorid[%d], %f);\r\n", xx,InfoActorEdicion[xx][h_actor]);
- fwrite(archivos, datos);
- 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]);
- fwrite(archivos, datos);
- fwrite(archivos, " // NOTA: cambiar los parametros: (Float:fDelta, loop, lockx, locky, freeze, time) \r\n");
- fwrite(archivos, " // https://wiki.sa-mp.com/wiki/ApplyActorAnimation \r\n\r\n");
- }
- fwrite(archivos, " return true;\r\n");
- fwrite(archivos, "}\r\n\r\n");
- fwrite(archivos, "public OnPlayerGiveDamageActor(playerid, damaged_actorid, Float: amount, weaponid, bodypart){\r\n\r\n");
- fwrite(archivos, " new\r\n");
- fwrite(archivos, " Float:health;\r\n");
- fwrite(archivos, " GetActorHealth(actorid[damaged_actorid], health);\r\n");
- fwrite(archivos, " if(IsValidActor(actorid[damaged_actorid])){\r\n");
- fwrite(archivos, " if(!IsActorInvulnerable(actorid[damaged_actorid])){\r\n");
- fwrite(archivos, " SetActorHealth(actorid[damaged_actorid], (health-amount));\r\n");
- fwrite(archivos, " if(health<=0.0){\r\n");
- fwrite(archivos, " SetActorHealth(actorid[damaged_actorid], 100.0);\r\n");
- fwrite(archivos, " }\r\n");
- fwrite(archivos, " }\r\n");
- fwrite(archivos, " }\r\n\r\n");
- fwrite(archivos, " return true;\r\n");
- fwrite(archivos, "}\r\n\r\n");
- fwrite(archivos, "/* * MAS FUNCIONES...: \r\n\r\n");
- fwrite(archivos, " GetActorPos => https://wiki.sa-mp.com/wiki/GetActorPos \r\n");
- fwrite(archivos, " GetActorVirtualWorld => https://wiki.sa-mp.com/wiki/GetActorVirtualWorld \r\n");
- fwrite(archivos, " GetPlayerTargetActor => https://wiki.sa-mp.com/wiki/GetPlayerTargetActor \r\n");
- fwrite(archivos, " IsActorInvulnerable => https://wiki.sa-mp.com/wiki/IsActorInvulnerable \r\n");
- fwrite(archivos, " IsActorStreamedIn => https://wiki.sa-mp.com/wiki/IsActorStreamedIn \r\n");
- fwrite(archivos, " IsValidActor => https://wiki.sa-mp.com/wiki/IsValidActor \r\n");
- fwrite(archivos, " OnActorStreamIn => https://wiki.sa-mp.com/wiki/OnActorStreamIn \r\n");
- fwrite(archivos, " OnActorStreamOut => https://wiki.sa-mp.com/wiki/OnActorStreamOut \r\n");
- fwrite(archivos, " OnPlayerGiveDamageActor => https://wiki.sa-mp.com/wiki/OnPlayerGiveDamageActor \r\n");
- fwrite(archivos, " SetActorFacingAngle => https://wiki.sa-mp.com/wiki/SetActorFacingAngle \r\n");
- fwrite(archivos, " SetActorHealth => https://wiki.sa-mp.com/wiki/SetActorHealth \r\n");
- fwrite(archivos, " SetActorInvulnerable => https://wiki.sa-mp.com/wiki/SetActorInvulnerable \r\n");
- fwrite(archivos, " SetActorPos => https://wiki.sa-mp.com/wiki/SetActorPos \r\n");
- fwrite(archivos, " SetActorVirtualWorld => https://wiki.sa-mp.com/wiki/SetActorVirtualWorld \r\n");
- fwrite(archivos, " ApplyActorAnimation => https://wiki.sa-mp.com/wiki/ApplyActorAnimation \r\n");
- fwrite(archivos, " ClearActorAnimations => https://wiki.sa-mp.com/wiki/ClearActorAnimations \r\n");
- fwrite(archivos, " CreateActor => https://wiki.sa-mp.com/wiki/CreateActor \r\n");
- fwrite(archivos, " DestroyActor => https://wiki.sa-mp.com/wiki/DestroyActor \r\n");
- fwrite(archivos, " GetActorFacingAngle => https://wiki.sa-mp.com/wiki/GetActorFacingAngle \r\n");
- fwrite(archivos, " GetActorHealth => https://wiki.sa-mp.com/wiki/GetActorHealth \r\n");
- fwrite(archivos, " GetActorPoolSize => https://wiki.sa-mp.com/wiki/GetActorPoolSize \r\n\r\n");
- fwrite(archivos, "*/ \r\n\r\n");
- fwrite(archivos, "/**** Sistema de edicion de actores - By OTACON ****/\r\n\r\n");
- fclose(archivos);
- }
- format(data,sizeof(data),"{005BA1}INFO: haz guardado todos los actores correctamente!. actores creados en total: [%d/%d].",cantidad_actores,MAX_ACTORS);
- SendClientMessage(playerid,-1,data);
- format(data,sizeof(data),"{005BA1}INFO: todos los actores se han guardado en el archivo: 'actors.%d04.txt', en 'scriptfiles'.",cantidad_archivos);
- SendClientMessage(playerid,-1,data);
- SendClientMessage(playerid,-1,"{EEE019}INFO: se ha reiniciado el editor, todos los actores han sido eliminados!.");
- cantidad_archivos++;
- for(new xx=1; xx<cantidad_actores+1; xx++){
- if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
- continue;
- DestroyActor(InfoActorEdicion[xx][c_actor]);
- Delete3DTextLabel(InfoActorEdicion[xx][label]);
- InfoActorEdicion[xx][a_skin] = 0;
- InfoActorEdicion[xx][c_actor] = 0;
- InfoActorEdicion[xx][i_actor] = false;
- InfoActorEdicion[xx][h_actor] = 0.0;
- InfoActorEdicion[xx][color_actor] = -1;
- format(InfoActorEdicion[xx][a_animlib],32,"%s","null");
- format(InfoActorEdicion[xx][a_animname],32,"%s","null");
- format(InfoActorEdicion[xx][a_name],24,"%s","Actor");
- DestroyObject(InfoActorEdicion[xx][objeto_select]);
- }
- cantidad_actores=0;
- }
- }
- }
- case DIALOG_ACTORS+5:{
- if(response){
- ShowPlayerDialog(playerid, DIALOG_ACTORS+6, DIALOG_STYLE_INPUT, "{FF6800}Sistema de edicion de actores:", "\
- {FFFFFF}escribe el id del actor que quieres establecer:. ", "aceptar", "cancelar");
- }else CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- }
- case DIALOG_ACTORS+6:{
- if(response){
- new opcion;
- if(!sscanf(inputtext, "d", opcion)){
- if( IsValidActor(InfoActorEdicion[opcion][c_actor]) ){
- id_seleccionado = opcion;
- format(data,sizeof(data),"{FFFFFF}INFO: el id del actor establecido es el: id:%d", id_seleccionado);
- SendClientMessage(playerid,-1,data);
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- }else{
- ShowPlayerDialog(playerid, DIALOG_ACTORS+6, DIALOG_STYLE_INPUT, "{FF6800}Sistema de edicion de actores:", "\
- {FFFFFF}escribe el id del actor que quieres establecer: \n\
- {A50000}NOTA: el id ingresado es incorrecto, intente nuevamente. ", "aceptar", "cancelar");
- }
- }else{
- ShowPlayerDialog(playerid, DIALOG_ACTORS+6, DIALOG_STYLE_INPUT, "{FF6800}Sistema de edicion de actores:", "\
- {FFFFFF}escribe el id del actor que quieres establecer: \n\
- {A50000}NOTA: no haz escrito nada, intente nuevamente. ", "aceptar", "cancelar");
- }
- }else CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- }
- case DIALOG_ACTORS+7:{
- if(response){
- ShowPlayerDialog(playerid, DIALOG_ACTORS+8, DIALOG_STYLE_INPUT, "{FF6800}Sistema de edicion de actores:", "\
- {FFFFFF}escribe el id del que tendra el actor, debe ser mayor o igual a 0, y menor o igual a 311.\n\
- {A50000}NOTA: puedes utilizar la opcion 'por defecto' que se le aplicara un id aleatorio del 0 al 311. ", "aceptar", "por defecto");
- }else{
- cantidad_actores++;
- InfoActorEdicion[cantidad_actores][a_skin] = 0;
- InfoActorEdicion[cantidad_actores][i_actor] = false;
- InfoActorEdicion[cantidad_actores][h_actor] = 0.0;
- InfoActorEdicion[cantidad_actores][color_actor] = -1;
- format(InfoActorEdicion[cantidad_actores][a_animlib],32,"%s","null");
- format(InfoActorEdicion[cantidad_actores][a_animname],32,"%s","null");
- format(InfoActorEdicion[cantidad_actores][a_name],24,"%s","Actor");
- InfoActorEdicion[cantidad_actores][a_skin] = random(311);
- InfoActorEdicion[cantidad_actores][c_actor] = CreateActor(InfoActorEdicion[cantidad_actores][a_skin], pos[0],pos[1],pos[2], pos[3]);
- SetActorPos(InfoActorEdicion[cantidad_actores][c_actor], pos[0],pos[1],pos[2]);
- SetActorFacingAngle(InfoActorEdicion[cantidad_actores][c_actor], pos[3]);
- SetActorVirtualWorld(InfoActorEdicion[cantidad_actores][c_actor], virtualword);
- InfoActorEdicion[cantidad_actores][h_actor] = vida_id;
- SetActorHealth(InfoActorEdicion[cantidad_actores][c_actor], InfoActorEdicion[cantidad_actores][h_actor]);
- InfoActorEdicion[cantidad_actores][i_actor] = actor_Invulnerable;
- SetActorInvulnerable(InfoActorEdicion[cantidad_actores][c_actor], InfoActorEdicion[cantidad_actores][i_actor]);
- InfoActorEdicion[cantidad_actores][objeto_select] = CreateObject(18631, pos[0],pos[1],pos[2], 0,0,0);
- InfoActorEdicion[cantidad_actores][label] = Create3DTextLabel("_",-1,pos[0],pos[1],pos[2]+1,10,virtualword,0);
- format(InfoActorEdicion[cantidad_actores][a_name],25,"%s","Actor");
- format(data,sizeof(data),"%s:(id:%d)",InfoActorEdicion[cantidad_actores][a_name],cantidad_actores);
- Update3DTextLabelText(InfoActorEdicion[cantidad_actores][label],InfoActorEdicion[cantidad_actores][color_actor],data);
- pos[0]=pos[0]-(1*floatsin(-pos[3],degrees));
- pos[1]=pos[1]-(1*floatcos(-pos[3],degrees));
- SetPlayerPos(playerid, pos[0],pos[1],pos[2]);
- format(data,sizeof(data),"{EEE019}INFO: haz creado un actor correctamente!. actores creados en total: [%d/%d].",cantidad_actores,MAX_ACTORS);
- SendClientMessage(playerid,-1,data);
- }
- }
- case DIALOG_ACTORS+8:{
- if(response){
- new ropa;
- if(!sscanf(inputtext, "d", ropa)){
- if(ropa>=0 && ropa<=311){
- cantidad_actores++;
- InfoActorEdicion[cantidad_actores][a_skin] = 0;
- InfoActorEdicion[cantidad_actores][i_actor] = false;
- InfoActorEdicion[cantidad_actores][h_actor] = 0.0;
- InfoActorEdicion[cantidad_actores][color_actor] = -1;
- format(InfoActorEdicion[cantidad_actores][a_animlib],32,"%s","null");
- format(InfoActorEdicion[cantidad_actores][a_animname],32,"%s","null");
- format(InfoActorEdicion[cantidad_actores][a_name],24,"%s","Actor");
- InfoActorEdicion[cantidad_actores][a_skin] = ropa;
- InfoActorEdicion[cantidad_actores][c_actor] = CreateActor(InfoActorEdicion[cantidad_actores][a_skin], pos[0],pos[1],pos[2], pos[3]);
- SetActorPos(InfoActorEdicion[cantidad_actores][c_actor], pos[0],pos[1],pos[2]);
- SetActorFacingAngle(InfoActorEdicion[cantidad_actores][c_actor], pos[3]);
- SetActorVirtualWorld(InfoActorEdicion[cantidad_actores][c_actor], virtualword);
- InfoActorEdicion[cantidad_actores][h_actor] = vida_id;
- SetActorHealth(InfoActorEdicion[cantidad_actores][c_actor], InfoActorEdicion[cantidad_actores][h_actor]);
- InfoActorEdicion[cantidad_actores][i_actor] = actor_Invulnerable;
- SetActorInvulnerable(InfoActorEdicion[cantidad_actores][c_actor], InfoActorEdicion[cantidad_actores][i_actor]);
- InfoActorEdicion[cantidad_actores][objeto_select] = CreateObject(18631, pos[0],pos[1],pos[2], 0,0,0);
- InfoActorEdicion[cantidad_actores][label] = Create3DTextLabel("_",-1,pos[0],pos[1],pos[2]+1,10,virtualword,0);
- format(InfoActorEdicion[cantidad_actores][a_name],25,"%s","Actor");
- format(data,sizeof(data),"%s:(id:%d)",InfoActorEdicion[cantidad_actores][a_name],cantidad_actores);
- Update3DTextLabelText(InfoActorEdicion[cantidad_actores][label],InfoActorEdicion[cantidad_actores][color_actor],data);
- pos[0]=pos[0]-(1*floatsin(-pos[3],degrees));
- pos[1]=pos[1]-(1*floatcos(-pos[3],degrees));
- SetPlayerPos(playerid, pos[0],pos[1],pos[2]);
- format(data,sizeof(data),"{EEE019}INFO: haz creado un actor correctamente!. actores creados en total: [%d/%d].",cantidad_actores,MAX_ACTORS);
- SendClientMessage(playerid,-1,data);
- }else{
- ShowPlayerDialog(playerid, DIALOG_ACTORS+8, DIALOG_STYLE_INPUT, "{FF6800}Sistema de edicion de actores:", "\
- {FFFFFF}escribe el id del que tendra el actor, debe ser mayor o igual a 0, y menor o igual a 311.\n\
- {A50000}NOTA: puedes utilizar la opcion 'por defecto' que se le aplicara un id aleatorio del 0 al 311. ", "aceptar", "por defecto");
- }
- }else{
- ShowPlayerDialog(playerid, DIALOG_ACTORS+8, DIALOG_STYLE_INPUT, "{FF6800}Sistema de edicion de actores:", "\
- {FFFFFF}escribe el id del que tendra el actor, debe ser mayor o igual a 0, y menor o igual a 311.\n\
- {A50000}NOTA: puedes utilizar la opcion 'por defecto' que se le aplicara un id aleatorio del 0 al 311. ", "aceptar", "por defecto");
- }
- }else{
- cantidad_actores++;
- InfoActorEdicion[cantidad_actores][a_skin] = 0;
- InfoActorEdicion[cantidad_actores][i_actor] = false;
- InfoActorEdicion[cantidad_actores][h_actor] = 0.0;
- InfoActorEdicion[cantidad_actores][color_actor] = -1;
- format(InfoActorEdicion[cantidad_actores][a_animlib],32,"%s","null");
- format(InfoActorEdicion[cantidad_actores][a_animname],32,"%s","null");
- format(InfoActorEdicion[cantidad_actores][a_name],24,"%s","Actor");
- InfoActorEdicion[cantidad_actores][a_skin] = random(311);
- InfoActorEdicion[cantidad_actores][c_actor] = CreateActor(InfoActorEdicion[cantidad_actores][a_skin], pos[0],pos[1],pos[2], pos[3]);
- SetActorPos(InfoActorEdicion[cantidad_actores][c_actor], pos[0],pos[1],pos[2]);
- SetActorFacingAngle(InfoActorEdicion[cantidad_actores][c_actor], pos[3]);
- SetActorVirtualWorld(InfoActorEdicion[cantidad_actores][c_actor], virtualword);
- InfoActorEdicion[cantidad_actores][h_actor] = vida_id;
- SetActorHealth(InfoActorEdicion[cantidad_actores][c_actor], InfoActorEdicion[cantidad_actores][h_actor]);
- InfoActorEdicion[cantidad_actores][i_actor] = actor_Invulnerable;
- SetActorInvulnerable(InfoActorEdicion[cantidad_actores][c_actor], InfoActorEdicion[cantidad_actores][i_actor]);
- InfoActorEdicion[cantidad_actores][objeto_select] = CreateObject(18631, pos[0],pos[1],pos[2], 0,0,0);
- InfoActorEdicion[cantidad_actores][label] = Create3DTextLabel("_",-1,pos[0],pos[1],pos[2]+1,10,virtualword,0);
- format(InfoActorEdicion[cantidad_actores][a_name],25,"%s","Actor");
- format(data,sizeof(data),"%s:(id:%d)",InfoActorEdicion[cantidad_actores][a_name],cantidad_actores);
- Update3DTextLabelText(InfoActorEdicion[cantidad_actores][label],InfoActorEdicion[cantidad_actores][color_actor],data);
- pos[0]=pos[0]-(1*floatsin(-pos[3],degrees));
- pos[1]=pos[1]-(1*floatcos(-pos[3],degrees));
- SetPlayerPos(playerid, pos[0],pos[1],pos[2]);
- format(data,sizeof(data),"{EEE019}INFO: haz creado un actor correctamente!. actores creados en total: [%d/%d].",cantidad_actores,MAX_ACTORS);
- SendClientMessage(playerid,-1,data);
- }
- }
- case DIALOG_ACTORS+9:{
- if(response){
- new name_a[25];
- if(!sscanf(inputtext, "s[25]", name_a)){
- if(strlen(name_a)>=4 && strlen(name_a)<=24){
- format(InfoActorEdicion[id_seleccionado][a_name],25,"%s",name_a);
- format(data,sizeof(data),"%s:(id:%d)",InfoActorEdicion[id_seleccionado][a_name],id_seleccionado);
- Update3DTextLabelText(InfoActorEdicion[id_seleccionado][label],InfoActorEdicion[id_seleccionado][color_actor],data);
- format(data,sizeof(data),"{FFFFFF}INFO: le haz cambiado el nombre al actor id:%d, correctamente!.", id_seleccionado);
- SendClientMessage(playerid,-1,data);
- format(data,sizeof(data),"{EEE019}NOTA: ahora el actor id:%d tiene el nombre de :%s.", id_seleccionado,InfoActorEdicion[id_seleccionado][a_name]);
- SendClientMessage(playerid,-1,data);
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- }else{
- format(data,sizeof(data),"{FFFFFF}¿Que nombre deseas colocarle al actor id:%d?: \n\
- {A50000}(NOTA: escribe el nombre que quieres que tendra el actor id:%d, \n\
- debe ser mayor o igual a 4, y menor o igual a 24).", id_seleccionado,id_seleccionado);
- ShowPlayerDialog(playerid, DIALOG_ACTORS+9, DIALOG_STYLE_INPUT, "{FF6800}Sistema de edicion de actores:", data, "aceptar", "cancelar");
- }
- }else{
- format(data,sizeof(data),"{FFFFFF}¿Que nombre deseas colocarle al actor id:%d?: \n\
- {A50000}(NOTA: escribe el nombre que quieres que tendra el actor id:%d, \n\
- debe ser mayor o igual a 4, y menor o igual a 24).", id_seleccionado,id_seleccionado);
- ShowPlayerDialog(playerid, DIALOG_ACTORS+9, DIALOG_STYLE_INPUT, "{FF6800}Sistema de edicion de actores:", data, "aceptar", "cancelar");
- }
- }else CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- }
- case DIALOG_ACTORS+10:{
- if(response){
- new name_a[25];
- if(!sscanf(inputtext, "s[25]", name_a)){
- if(strlen(name_a)>=4 && strlen(name_a)<=24){
- for(new xx=0; xx<cantidad_actores+1; xx++){
- if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
- continue;
- format(InfoActorEdicion[xx][a_name],25,"%s",name_a);
- format(data,sizeof(data),"%s:(id:%d)",InfoActorEdicion[xx][a_name],xx);
- Update3DTextLabelText(InfoActorEdicion[xx][label],InfoActorEdicion[xx][color_actor],data);
- }
- format(data,sizeof(data),"{FFFFFF}INFO: le haz cambiado el nombre a los %d actorres creados, correctamente!.", cantidad_actores);
- SendClientMessage(playerid,-1,data);
- format(data,sizeof(data),"{EEE019}NOTA: ahora los %d actores tienen el nombre de :%s.", cantidad_actores,name_a);
- SendClientMessage(playerid,-1,data);
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- }else{
- format(data,sizeof(data),"{FFFFFF}¿Que nombre deseas colocarles a los %d actorres creados?: \n\
- {A50000}(NOTA: escribe el nombre que quieres que tendran los %d actor creados, \n\
- debe ser mayor o igual a 4, y menor o igual a 24).", cantidad_actores,cantidad_actores);
- ShowPlayerDialog(playerid, DIALOG_ACTORS+10, DIALOG_STYLE_INPUT, "{FF6800}Sistema de edicion de actores:", data, "aceptar", "cancelar");
- }
- }else{
- format(data,sizeof(data),"{FFFFFF}¿Que nombre deseas colocarles a los %d actorres creados?: \n\
- {A50000}(NOTA: escribe el nombre que quieres que tendran los %d actor creados, \n\
- debe ser mayor o igual a 4, y menor o igual a 24).", cantidad_actores,cantidad_actores);
- ShowPlayerDialog(playerid, DIALOG_ACTORS+10, DIALOG_STYLE_INPUT, "{FF6800}Sistema de edicion de actores:", data, "aceptar", "cancelar");
- }
- }else CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- }
- case DIALOG_ACTORS+11:{
- if(response){
- switch(listitem){
- case 0:{
- if(IsPlayerInAnyVehicle(playerid)){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no puedes utilizar el editor de actores desde un vehiculo!."); }
- if(!creando_actors[playerid]){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: usted no se encuentra con el editor de actores encendido!."); }
- if(cantidad_actores<=0){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no hay ningun actor creado hasta el momento!."); }
- ShowPlayerDialog(playerid, DIALOG_ACTORS+5, DIALOG_STYLE_MSGBOX, "{FF6800}Sistema de edicion de actores:", "\
- {FFFFFF}¿Deseas seleccionar un id especifico de un actor creado?:", "aceptar", "cancelar");
- }
- case 1:{
- if(IsPlayerInAnyVehicle(playerid)){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no puedes utilizar el editor de actores desde un vehiculo!."); }
- if(!creando_actors[playerid]){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: usted no se encuentra con el editor de actores encendido!."); }
- if(cantidad_actores<=0){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no hay ningun actor creado hasta el momento!."); }
- if(id_seleccionado<=0){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: usted no ha seleccionado ningun id para la edicion!."); }
- GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
- format(InfoActorEdicion[id_seleccionado][a_animlib],32,"%s",animlib);
- format(InfoActorEdicion[id_seleccionado][a_animname],32,"%s",animname);
- ClearActorAnimations(InfoActorEdicion[id_seleccionado][c_actor]);
- ApplyActorAnimation(InfoActorEdicion[id_seleccionado][c_actor], InfoActorEdicion[id_seleccionado][a_animlib], InfoActorEdicion[id_seleccionado][a_animname], 4.1, 0, 0, 0, 0, 0);
- ApplyActorAnimation(InfoActorEdicion[id_seleccionado][c_actor], InfoActorEdicion[id_seleccionado][a_animlib], InfoActorEdicion[id_seleccionado][a_animname], 4.1, 0, 0, 0, 0, 0);
- format(data,sizeof(data),"{EEE019}INFO: le haz aplicado una animacion al actor id:%d, correctamente!.",id_seleccionado);
- SendClientMessage(playerid,-1,data);
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- }
- case 2:{
- if(IsPlayerInAnyVehicle(playerid)){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no puedes utilizar el editor de actores desde un vehiculo!."); }
- if(!creando_actors[playerid]){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: usted no se encuentra con el editor de actores encendido!."); }
- if(cantidad_actores<=0){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no hay ningun actor creado hasta el momento!."); }
- GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
- for(new xx=0; xx<cantidad_actores+1; xx++){
- if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
- continue;
- format(InfoActorEdicion[xx][a_animlib],32,"%s",animlib);
- format(InfoActorEdicion[xx][a_animname],32,"%s",animname);
- ClearActorAnimations(InfoActorEdicion[xx][c_actor]);
- ApplyActorAnimation(InfoActorEdicion[xx][c_actor], InfoActorEdicion[xx][a_animlib], InfoActorEdicion[xx][a_animname], 4.1, 0, 0, 0, 0, 0);
- ApplyActorAnimation(InfoActorEdicion[xx][c_actor], InfoActorEdicion[xx][a_animlib], InfoActorEdicion[xx][a_animname], 4.1, 0, 0, 0, 0, 0);
- }
- SendClientMessage(playerid,-1,"{EEE019}INFO: le haz aplicado una animacion ha todos los actores creados, correctamente!.");
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- }
- case 3:{
- if(IsPlayerInAnyVehicle(playerid)){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no puedes utilizar el editor de actores desde un vehiculo!."); }
- if(!creando_actors[playerid]){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: usted no se encuentra con el editor de actores encendido!."); }
- if(cantidad_actores<=0){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no hay ningun actor creado hasta el momento!."); }
- if(id_seleccionado<=0){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: usted no ha seleccionado ningun id para la edicion!."); }
- format(data,sizeof(data),"{FFFFFF}¿Que nombre deseas colocarle al actor id:%d?:",id_seleccionado);
- ShowPlayerDialog(playerid, DIALOG_ACTORS+9, DIALOG_STYLE_INPUT, "{FF6800}Sistema de edicion de actores:", data, "aceptar", "cancelar");
- }
- case 4:{
- if(IsPlayerInAnyVehicle(playerid)){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no puedes utilizar el editor de actores desde un vehiculo!."); }
- if(!creando_actors[playerid]){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: usted no se encuentra con el editor de actores encendido!."); }
- if(cantidad_actores<=0){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no hay ningun actor creado hasta el momento!."); }
- format(data,sizeof(data),"{FFFFFF}¿Que nombre deseas colocarles a los %d actorres creados?:",cantidad_actores);
- ShowPlayerDialog(playerid, DIALOG_ACTORS+10, DIALOG_STYLE_INPUT, "{FF6800}Sistema de edicion de actores:", data, "aceptar", "cancelar");
- }
- case 5:{
- if(IsPlayerInAnyVehicle(playerid)){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no puedes utilizar el editor de actores desde un vehiculo!."); }
- if(!creando_actors[playerid]){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: usted no se encuentra con el editor de actores encendido!."); }
- if(cantidad_actores<=0){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no hay ningun actor creado hasta el momento!."); }
- if(id_seleccionado<=0){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: usted no ha seleccionado ningun id para la edicion!."); }
- seleccionando_skins[playerid][0] = true;
- format(data,sizeof(data),"{FFFFFF}\n\t\t * visualizando skin: [ %d / 311 ] \n\n\
- \t\t{FF6800}>>: selecciona la opcion que prefieras: \n\
- opcion - skin '>>' \n\
- opcion - skin '<<' \n\
- opcion - skin 'random' \n",seleccion_skis);
- ShowPlayerDialog(playerid, DIALOG_ACTORS+12, DIALOG_STYLE_LIST, "{FF6800}Sistema de edicion de actores:", data, "seleccionar", "finalizar");
- }
- case 6:{
- if(IsPlayerInAnyVehicle(playerid)){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no puedes utilizar el editor de actores desde un vehiculo!."); }
- if(!creando_actors[playerid]){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: usted no se encuentra con el editor de actores encendido!."); }
- if(cantidad_actores<=0){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no hay ningun actor creado hasta el momento!."); }
- seleccionando_skins[playerid][1] = true;
- format(data,sizeof(data),"{FFFFFF}\n\t\t * visualizando skin: [ %d / 311 ] \n\n\
- \t\t{FF6800}>>: selecciona la opcion que prefieras: \n\
- opcion - skin '>>' \n\
- opcion - skin '<<' \n\
- opcion - skin 'random' \n",seleccion_skis);
- ShowPlayerDialog(playerid, DIALOG_ACTORS+13, DIALOG_STYLE_LIST, "{FF6800}Sistema de edicion de actores:", data, "seleccionar", "finalizar");
- }
- case 7:{
- if(IsPlayerInAnyVehicle(playerid)){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no puedes utilizar el editor de actores desde un vehiculo!."); }
- if(!creando_actors[playerid]){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: usted no se encuentra con el editor de actores encendido!."); }
- if(cantidad_actores<=0){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no hay ningun actor creado hasta el momento!."); }
- if(id_seleccionado<=0){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: usted no ha seleccionado ningun id para la edicion!."); }
- ShowPlayerDialog(playerid, DIALOG_ACTORS+14, DIALOG_STYLE_INPUT, "{FF6800}Sistema de edicion de actores:", "\
- {FFFFFF}colocar el color que le quieres colocar al nombre del actor: \n\
- {A50000}(NOTA: el formato del color debe ser en 'hexadecimal', ejemplo: 0xFFFFFFFF \n\
- ", "aceptar", "cancelar");
- }
- case 8:{
- if(IsPlayerInAnyVehicle(playerid)){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no puedes utilizar el editor de actores desde un vehiculo!."); }
- if(!creando_actors[playerid]){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: usted no se encuentra con el editor de actores encendido!."); }
- if(cantidad_actores<=0){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no hay ningun actor creado hasta el momento!."); }
- ShowPlayerDialog(playerid, DIALOG_ACTORS+15, DIALOG_STYLE_INPUT, "{FF6800}Sistema de edicion de actores:", "\
- {FFFFFF}colocar el color que le quieres colocar al nombre de todos los actores: \n\
- {A50000}(NOTA: el formato del color debe ser en 'hexadecimal', ejemplo: 0xFFFFFFFF \n\
- ", "aceptar", "cancelar");
- }
- case 9:{
- if(IsPlayerInAnyVehicle(playerid)){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no puedes utilizar el editor de actores desde un vehiculo!."); }
- if(!creando_actors[playerid]){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: usted no se encuentra con el editor de actores encendido!."); }
- if(cantidad_actores<=0){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no hay ningun actor creado hasta el momento!."); }
- seleccioando_actor[playerid][0]=true;
- SelectObject(playerid);
- SendClientMessage(playerid,-1,"{EEE019}INFO: ahora selecciona a un actor para establecer su id!.");
- SendClientMessage(playerid,-1,"{FFFFFF}INFO: para cambiar la camara cuando estas en modo edicion,");
- SendClientMessage(playerid,-1,"{FFFFFF}manten la tecla 'BARRA' y mueve el 'mouse' para cambiarla!.");
- }
- case 10:{
- if(IsPlayerInAnyVehicle(playerid)){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no puedes utilizar el editor de actores desde un vehiculo!."); }
- if(!creando_actors[playerid]){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: usted no se encuentra con el editor de actores encendido!."); }
- if(cantidad_actores<=0){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no hay ningun actor creado hasta el momento!."); }
- seleccioando_actor[playerid][1]=true;
- SelectObject(playerid);
- SendClientMessage(playerid,-1,"{EEE019}INFO: ahora selecciona a un actor para empezar a moverlo!.");
- SendClientMessage(playerid,-1,"{FFFFFF}INFO: para cambiar la camara cuando estas en modo edicion,");
- SendClientMessage(playerid,-1,"{FFFFFF}manten la tecla 'BARRA' y mueve el 'mouse' para cambiarla!.");
- }
- }
- }
- }
- case DIALOG_ACTORS+12:{
- if(response){
- switch(listitem){
- case 3:{
- if(!seleccionando_skins[playerid][0]){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: usted no ha seleccionado ningun id para la edicion!.");}
- if(seleccion_skis>=311) seleccion_skis=311;
- else seleccion_skis++;
- format(data,sizeof(data),"{FFFFFF}\n\t\t * visualizando skin: [ %d / 311 ] \n\n\
- \t\t{FF6800}>>: selecciona la opcion que prefieras: \n\
- opcion - skin '>>' \n\
- opcion - skin '<<' \n\
- opcion - skin 'random' \n",seleccion_skis);
- ShowPlayerDialog(playerid, DIALOG_ACTORS+12, DIALOG_STYLE_LIST, "{FF6800}Sistema de edicion de actores:", data, "seleccionar", "finalizar");
- GetActorPos(InfoActorEdicion[id_seleccionado][c_actor], pos[0],pos[1],pos[2]);
- GetActorFacingAngle(InfoActorEdicion[id_seleccionado][c_actor], pos[3]);
- DestroyActor(InfoActorEdicion[id_seleccionado][c_actor]);
- InfoActorEdicion[id_seleccionado][a_skin] = seleccion_skis;
- InfoActorEdicion[id_seleccionado][c_actor] = CreateActor(InfoActorEdicion[id_seleccionado][a_skin], pos[0],pos[1],pos[2], pos[3]);
- }
- case 4:{
- if(!seleccionando_skins[playerid][0]){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: usted no ha seleccionado ningun id para la edicion!."); }
- if(seleccion_skis<=0) seleccion_skis=0;
- else seleccion_skis--;
- format(data,sizeof(data),"{FFFFFF}\n\t\t * visualizando skin: [ %d / 311 ] \n\n\
- \t\t{FF6800}>>: selecciona la opcion que prefieras: \n\
- opcion - skin '>>' \n\
- opcion - skin '<<' \n\
- opcion - skin 'random' \n",seleccion_skis);
- ShowPlayerDialog(playerid, DIALOG_ACTORS+12, DIALOG_STYLE_LIST, "{FF6800}Sistema de edicion de actores:", data, "seleccionar", "finalizar");
- GetActorPos(InfoActorEdicion[id_seleccionado][c_actor], pos[0],pos[1],pos[2]);
- GetActorFacingAngle(InfoActorEdicion[id_seleccionado][c_actor], pos[3]);
- DestroyActor(InfoActorEdicion[id_seleccionado][c_actor]);
- InfoActorEdicion[id_seleccionado][a_skin] = seleccion_skis;
- InfoActorEdicion[id_seleccionado][c_actor] = CreateActor(InfoActorEdicion[id_seleccionado][a_skin], pos[0],pos[1],pos[2], pos[3]);
- }
- case 5:{
- if(!seleccionando_skins[playerid][0]){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: usted no ha seleccionado ningun id para la edicion!."); }
- seleccion_skis=random(311);
- format(data,sizeof(data),"{FFFFFF}\n\t\t * visualizando skin: [ %d / 311 ] \n\n\
- \t\t{FF6800}>>: selecciona la opcion que prefieras: \n\
- opcion - skin '>>' \n\
- opcion - skin '<<' \n\
- opcion - skin 'random' \n",seleccion_skis);
- ShowPlayerDialog(playerid, DIALOG_ACTORS+12, DIALOG_STYLE_LIST, "{FF6800}Sistema de edicion de actores:", data, "seleccionar", "finalizar");
- GetActorPos(InfoActorEdicion[id_seleccionado][c_actor], pos[0],pos[1],pos[2]);
- GetActorFacingAngle(InfoActorEdicion[id_seleccionado][c_actor], pos[3]);
- DestroyActor(InfoActorEdicion[id_seleccionado][c_actor]);
- InfoActorEdicion[id_seleccionado][a_skin] = seleccion_skis;
- InfoActorEdicion[id_seleccionado][c_actor] = CreateActor(InfoActorEdicion[id_seleccionado][a_skin], pos[0],pos[1],pos[2], pos[3]);
- }
- default:{
- format(data,sizeof(data),"{FFFFFF}\n\t\t * visualizando skin: [ %d / 311 ] \n\n\
- \t\t{FF6800}>>: selecciona la opcion que prefieras: \n\
- opcion - skin '>>' \n\
- opcion - skin '<<' \n\
- opcion - skin 'random' \n",seleccion_skis);
- ShowPlayerDialog(playerid, DIALOG_ACTORS+12, DIALOG_STYLE_LIST, "{FF6800}Sistema de edicion de actores:", data, "seleccionar", "finalizar");
- }
- }
- }else{seleccionando_skins[playerid][0] = false;CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");}
- }
- case DIALOG_ACTORS+13:{
- if(response){
- switch(listitem){
- case 3:{
- if(!seleccionando_skins[playerid][1]){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: usted no ha seleccionado ningun id para la edicion!."); }
- if(seleccion_skis>=311) seleccion_skis=311;
- else seleccion_skis++;
- format(data,sizeof(data),"{FFFFFF}\n\t\t * visualizando skin: [ %d / 311 ] \n\n\
- \t\t{FF6800}>>: selecciona la opcion que prefieras: \n\
- opcion - skin '>>' \n\
- opcion - skin '<<' \n\
- opcion - skin 'random' \n",seleccion_skis);
- ShowPlayerDialog(playerid, DIALOG_ACTORS+13, DIALOG_STYLE_LIST, "{FF6800}Sistema de edicion de actores:", data, "seleccionar", "finalizar");
- for(new xx=1; xx<cantidad_actores+1; xx++){
- if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
- continue;
- GetActorPos(InfoActorEdicion[xx][c_actor], pos[0],pos[1],pos[2]);
- GetActorFacingAngle(InfoActorEdicion[xx][c_actor], pos[3]);
- DestroyActor(InfoActorEdicion[xx][c_actor]);
- InfoActorEdicion[xx][a_skin] = seleccion_skis;
- InfoActorEdicion[xx][c_actor] = CreateActor(InfoActorEdicion[xx][a_skin], pos[0],pos[1],pos[2], pos[3]);
- }
- }
- case 4:{
- if(!seleccionando_skins[playerid][1]){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: usted no ha seleccionado ningun id para la edicion!."); }
- if(seleccion_skis<=0) seleccion_skis=0;
- else seleccion_skis--;
- format(data,sizeof(data),"{FFFFFF}\n\t\t * visualizando skin: [ %d / 311 ] \n\n\
- \t\t{FF6800}>>: selecciona la opcion que prefieras: \n\
- opcion - skin '>>' \n\
- opcion - skin '<<' \n\
- opcion - skin 'random' \n",seleccion_skis);
- ShowPlayerDialog(playerid, DIALOG_ACTORS+13, DIALOG_STYLE_LIST, "{FF6800}Sistema de edicion de actores:", data, "seleccionar", "finalizar");
- for(new xx=1; xx<cantidad_actores+1; xx++){
- if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
- continue;
- GetActorPos(InfoActorEdicion[xx][c_actor], pos[0],pos[1],pos[2]);
- GetActorFacingAngle(InfoActorEdicion[xx][c_actor], pos[3]);
- DestroyActor(InfoActorEdicion[xx][c_actor]);
- InfoActorEdicion[xx][a_skin] = seleccion_skis;
- InfoActorEdicion[xx][c_actor] = CreateActor(InfoActorEdicion[xx][a_skin], pos[0],pos[1],pos[2], pos[3]);
- }
- }
- case 5:{
- if(!seleccionando_skins[playerid][1]){
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- return SendClientMessage(playerid,-1,"{919BA4}INFO: usted no ha seleccionado ningun id para la edicion!."); }
- seleccion_skis=random(311);
- format(data,sizeof(data),"{FFFFFF}\n\t\t * visualizando skin: [ %d / 311 ] \n\n\
- \t\t{FF6800}>>: selecciona la opcion que prefieras: \n\
- opcion - skin '>>' \n\
- opcion - skin '<<' \n\
- opcion - skin 'random' \n",seleccion_skis);
- ShowPlayerDialog(playerid, DIALOG_ACTORS+13, DIALOG_STYLE_LIST, "{FF6800}Sistema de edicion de actores:", data, "seleccionar", "finalizar");
- for(new xx=1; xx<cantidad_actores+1; xx++){
- if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
- continue;
- GetActorPos(InfoActorEdicion[xx][c_actor], pos[0],pos[1],pos[2]);
- GetActorFacingAngle(InfoActorEdicion[xx][c_actor], pos[3]);
- DestroyActor(InfoActorEdicion[xx][c_actor]);
- InfoActorEdicion[xx][a_skin] = seleccion_skis;
- InfoActorEdicion[xx][c_actor] = CreateActor(InfoActorEdicion[xx][a_skin], pos[0],pos[1],pos[2], pos[3]);
- }
- }
- default:{
- format(data,sizeof(data),"{FFFFFF}\n\t\t * visualizando skin: [ %d / 311 ] \n\n\
- \t\t{FF6800}>>: selecciona la opcion que prefieras: \n\
- opcion - skin '>>' \n\
- opcion - skin '<<' \n\
- opcion - skin 'random' \n",seleccion_skis);
- ShowPlayerDialog(playerid, DIALOG_ACTORS+13, DIALOG_STYLE_LIST, "{FF6800}Sistema de edicion de actores:", data, "seleccionar", "finalizar");
- }
- }
- }else{seleccionando_skins[playerid][1] = false;CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");}
- }
- case DIALOG_ACTORS+14:{
- if(response){
- if(strlen(inputtext)==10){
- if(inputtext[0]=='0' && inputtext[1]=='x'){
- InfoActorEdicion[id_seleccionado][color_actor] = HexToInt(inputtext);
- format(data,sizeof(data),"%s:(id:%d)",InfoActorEdicion[id_seleccionado][a_name],id_seleccionado);
- Update3DTextLabelText(InfoActorEdicion[id_seleccionado][label],InfoActorEdicion[id_seleccionado][color_actor],data);
- format(data,sizeof(data),"{FFFFFF}INFO: le haz cambiado el color del nombre al actor id:%d, correctamente!.", id_seleccionado);
- SendClientMessage(playerid,-1,data);
- format(data,sizeof(data),"{A50000}INFO: color cambiado es: {%06x} 0x%08x", HexToInt(InfoActorEdicion[id_seleccionado][color_actor])>>>8, InfoActorEdicion[id_seleccionado][color_actor]);
- SendClientMessage(playerid,-1,data);
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- }else{
- ShowPlayerDialog(playerid, DIALOG_ACTORS+14, DIALOG_STYLE_INPUT, "{FF6800}Sistema de edicion de actores:", "\
- {FFFFFF}colocar el color que le quieres colocar al nombre del actor: \n\
- {A50000}(NOTA: el formato del color debe ser en 'hexadecimal', ejemplo: 0xFFFFFFFF \n\
- ", "aceptar", "cancelar");
- }
- }else{
- ShowPlayerDialog(playerid, DIALOG_ACTORS+14, DIALOG_STYLE_INPUT, "{FF6800}Sistema de edicion de actores:", "\
- {FFFFFF}colocar el color que le quieres colocar al nombre del actor: \n\
- {A50000}(NOTA: el formato del color debe ser en 'hexadecimal', ejemplo: 0xFFFFFFFF \n\
- ", "aceptar", "cancelar");
- }
- }else CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- }
- case DIALOG_ACTORS+15:{
- if(response){
- if(strlen(inputtext)==10){
- if(inputtext[0]=='0' && inputtext[1]=='x'){
- for(new xx=1; xx<cantidad_actores+1; xx++){
- if(!IsValidActor(InfoActorEdicion[xx][c_actor]))
- continue;
- InfoActorEdicion[xx][color_actor] = HexToInt(inputtext);
- format(data,sizeof(data),"%s:(id:%d)",InfoActorEdicion[xx][a_name],xx);
- Update3DTextLabelText(InfoActorEdicion[xx][label],InfoActorEdicion[xx][color_actor],data);
- }
- SendClientMessage(playerid,-1,"{FFFFFF}INFO: le haz cambiado el color del nombre a todos los actores creados, correctamente!.");
- format(data,sizeof(data),"{A50000}INFO: color cambiado es: {%06x} 0x%08x", HexToInt(inputtext)>>>8, HexToInt(inputtext));
- SendClientMessage(playerid,-1,data);
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- }else{
- ShowPlayerDialog(playerid, DIALOG_ACTORS+15, DIALOG_STYLE_INPUT, "{FF6800}Sistema de edicion de actores:", "\
- {FFFFFF}colocar el color que le quieres colocar al nombre de todos los actores: \n\
- {A50000}(NOTA: el formato del color debe ser en 'hexadecimal', ejemplo: 0xFFFFFFFF \n\
- ", "aceptar", "cancelar");
- }
- }else{
- ShowPlayerDialog(playerid, DIALOG_ACTORS+15, DIALOG_STYLE_INPUT, "{FF6800}Sistema de edicion de actores:", "\
- {FFFFFF}colocar el color que le quieres colocar al nombre de todos los actores: \n\
- {A50000}(NOTA: el formato del color debe ser en 'hexadecimal', ejemplo: 0xFFFFFFFF \n\
- ", "aceptar", "cancelar");
- }
- }else CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- }
- case DIALOG_ACTORS+16:{
- if(response){
- tipo_archivo_a[playerid] = true;
- ShowPlayerDialog(playerid, DIALOG_ACTORS+4, DIALOG_STYLE_INPUT, "{FF6800}Sistema de edicion de actores:", "\
- {FFFFFF}escribe un nombre para el archivo que guardara los actores creados.\n\
- {A50000}NOTA: puedes utilizar la opcion 'por defecto' que se le aplicara\n\
- el nombre {FFFFFF}'actors.0001' {A50000}(el numero va contando por archivo creados). ", "aceptar", "por defecto");
- }else{
- tipo_archivo_a[playerid] = false;
- ShowPlayerDialog(playerid, DIALOG_ACTORS+4, DIALOG_STYLE_INPUT, "{FF6800}Sistema de edicion de actores:", "\
- {FFFFFF}escribe un nombre para el archivo que guardara los actores creados.\n\
- {A50000}NOTA: puedes utilizar la opcion 'por defecto' que se le aplicara\n\
- el nombre {FFFFFF}'actors.0001' {A50000}(el numero va contando por archivo creados). ", "aceptar", "por defecto");
- }
- }
- }
- return false;
- }
- public OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ){
- new data[100];
- if(type == SELECT_OBJECT_GLOBAL_OBJECT){
- if(seleccioando_actor[playerid][0]){
- id_seleccionado = objectid;
- format(data,sizeof(data),"{FFFFFF}INFO: el id del actor establecido es el: id:%d", id_seleccionado);
- SendClientMessage(playerid,-1,data);
- CancelEdit(playerid);
- seleccioando_actor[playerid][0]=false;
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- }
- else if(seleccioando_actor[playerid][1]){
- id_seleccionado = objectid;
- format(data,sizeof(data),"{FFFFFF}INFO: el id del actor seleccionado es el: id:%d", id_seleccionado);
- SendClientMessage(playerid,-1,data);
- EditObject(playerid, InfoActorEdicion[id_seleccionado][objeto_select]);
- SendClientMessage(playerid,-1,"{EEE019}INFO: ahora mueve de posicion al actor con el modo de edicion!.");
- SendClientMessage(playerid,-1,"{FFFFFF}INFO: para cambiar la camara cuando estas en modo edicion,");
- SendClientMessage(playerid,-1,"{FFFFFF}manten la tecla 'BARRA' y mueve el 'mouse' para cambiarla!.");
- virtualword_actors = GetActorVirtualWorld(InfoActorEdicion[objectid][c_actor]);
- GetActorPos(InfoActorEdicion[objectid][c_actor], old_actors[0], old_actors[1], old_actors[2]);
- GetActorFacingAngle(InfoActorEdicion[objectid][c_actor], old_actors[3]);
- }
- }
- return true;
- }
- public OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ){
- new data[50];
- if(seleccioando_actor[playerid][1]){
- switch(response){
- // player moved the object (edition did not stop at all)
- case EDIT_RESPONSE_UPDATE:{
- if(!playerobject){
- SetObjectPos(InfoActorEdicion[objectid][objeto_select], fX, fY, fZ);
- SetObjectRot(InfoActorEdicion[objectid][objeto_select], 0, 0, fRotZ);
- DestroyActor(InfoActorEdicion[objectid][c_actor]);
- InfoActorEdicion[objectid][c_actor] = CreateActor(InfoActorEdicion[objectid][a_skin], fX, fY, fZ, fRotZ);
- Delete3DTextLabel(InfoActorEdicion[objectid][label]);
- InfoActorEdicion[objectid][label] = Create3DTextLabel("_",-1,fX, fY, fZ+1,10,virtualword_actors,0);
- format(data,sizeof(data),"%s:(id:%d)",InfoActorEdicion[objectid][a_name],objectid);
- Update3DTextLabelText(InfoActorEdicion[objectid][label],InfoActorEdicion[objectid][color_actor],data);
- }
- }
- // player clicked on save
- case EDIT_RESPONSE_FINAL:{
- seleccioando_actor[playerid][1]=false;
- SetObjectPos(InfoActorEdicion[objectid][objeto_select], fX, fY, fZ);
- SetObjectRot(InfoActorEdicion[objectid][objeto_select], 0, 0, fRotZ);
- DestroyActor(InfoActorEdicion[objectid][c_actor]);
- InfoActorEdicion[objectid][c_actor] = CreateActor(InfoActorEdicion[objectid][a_skin], fX, fY, fZ, fRotZ);
- Delete3DTextLabel(InfoActorEdicion[objectid][label]);
- InfoActorEdicion[objectid][label] = Create3DTextLabel("_",-1,fX, fY, fZ+1,10,virtualword_actors,0);
- format(data,sizeof(data),"%s:(id:%d)",InfoActorEdicion[objectid][a_name],objectid);
- Update3DTextLabelText(InfoActorEdicion[objectid][label],InfoActorEdicion[objectid][color_actor],data);
- SendClientMessage(playerid,-1,"{EEE019}INFO: haz finalizado la edicion del actor,");
- SendClientMessage(playerid,-1,"{EEE019}se le ha establecido la nueva posicion al actor!.");
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- }
- // player cancelled (ESC)
- case EDIT_RESPONSE_CANCEL:{
- if(!playerobject){
- seleccioando_actor[playerid][1]=false;
- SetObjectPos(InfoActorEdicion[objectid][objeto_select], old_actors[0], old_actors[1], old_actors[2]);
- SetObjectRot(InfoActorEdicion[objectid][objeto_select], 0, 0, old_actors[3]);
- DestroyActor(InfoActorEdicion[objectid][c_actor]);
- InfoActorEdicion[objectid][c_actor] = CreateActor(InfoActorEdicion[objectid][a_skin], old_actors[0], old_actors[1], old_actors[2], old_actors[3]);
- Delete3DTextLabel(InfoActorEdicion[objectid][label]);
- InfoActorEdicion[objectid][label] = Create3DTextLabel("_",-1,old_actors[0], old_actors[1], old_actors[2]+1,10,virtualword_actors,0);
- format(data,sizeof(data),"%s:(id:%d)",InfoActorEdicion[objectid][a_name],objectid);
- Update3DTextLabelText(InfoActorEdicion[objectid][label],InfoActorEdicion[objectid][color_actor],data);
- SendClientMessage(playerid,-1,"{EEE019}INFO: haz cancelado la edicion del actor,");
- SendClientMessage(playerid,-1,"{EEE019}se le ha establecido la antigua posicion del actor!.");
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorfunction");
- }
- }
- }
- }
- }
- COMMAND:actorhelp(playerid, params[]){
- new
- data[2024];
- strcat(data,"{FFFFFF}INFO: utiliza las siguientes teclas para la edicion de los actores: \n\n");
- strcat(data,"{FF6800}>>: tecla 'Y' para crear un actor en tu posicion. \n");
- strcat(data,"{FF6800}>>: tecla 'N' para elimirar el actor creado anteriormente. \n");
- strcat(data,"{FF6800}>>: tecla 'C' y 'ENTER' (juntas) para eliminar todos los actores creador hasta el momento. \n");
- strcat(data,"{FF6800}>>: tecla 'C' y 'BARRA' (juntas) para guardar todos los actores creador hasta el momento. \n");
- strcat(data,"{FF6800}>>: tecla 'C' y 'H' (juntas) para iniciar el dialog de ayuda. \n\n");
- strcat(data,"{FFFFFF}INFO: utiliza los siguientes comandos para la edicion de los actores: \n\n");
- strcat(data,"{FF6800}>>: utiliza el comando '/actorfunction' para utilizar la funciones disponibles \n");
- strcat(data,"{FF6800}>>: utiliza el comando '/actor' para encender/apagar el sistema de edicion de actores. \n");
- ShowPlayerDialog(playerid, DIALOG_ACTORS+0, DIALOG_STYLE_MSGBOX, "{FF6800}Sistema de edicion de actores:", data, "cerrar", "mas...");
- return true;
- }
- COMMAND:actorfunction(playerid, params[]){
- if(IsPlayerInAnyVehicle(playerid))
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no puedes utilizar el editor de actores desde un vehiculo!.");
- new
- data[2024];
- strcat(data,"opcion \t comentario \n");
- // NOTE: change the comment to your preference.
- strcat(data,"{FF6800}>>: {FFFFFF}establecer un id especifico. \t{2C2E2E} created by OTACON.\n");
- strcat(data,"{FF6800}>>: {FFFFFF}establecer una animacion al id especifico. \t{2C2E2E} created by OTACON.\n");
- strcat(data,"{FF6800}>>: {FFFFFF}establecer una animacion a todos los actores. \t{2C2E2E} created by OTACON.\n");
- strcat(data,"{FF6800}>>: {FFFFFF}cambiar el nombre a un actor especifico. \t{2C2E2E} created by OTACON.\n");
- strcat(data,"{FF6800}>>: {FFFFFF}cambiar el nombre a todos los actores. \t{2C2E2E} created by OTACON.\n");
- strcat(data,"{FF6800}>>: {FFFFFF}seleccionador de skins para el id especifico. \t{2C2E2E} created by OTACON.\n");
- strcat(data,"{FF6800}>>: {FFFFFF}seleccionador de skins para todos los actores. \t{2C2E2E} created by OTACON.\n");
- strcat(data,"{FF6800}>>: {FFFFFF}cambiar el color del nombre para el id especifico. \t{2C2E2E} created by OTACON.\n");
- strcat(data,"{FF6800}>>: {FFFFFF}cambiar el color del nombre para todos los actores. \t{2C2E2E} created by OTACON.\n");
- strcat(data,"{FF6800}>>: {FFFFFF}seleccionar un id especifico. \t{2C2E2E} created by OTACON.\n");
- strcat(data,"{FF6800}>>: {FFFFFF}mover de posicion a un actor, seleccionandolo. \t{2C2E2E} created by OTACON.\n");
- ShowPlayerDialog(playerid, DIALOG_ACTORS+11, DIALOG_STYLE_TABLIST_HEADERS,\
- "{FF6800}Sistema de edicion de actores:", data, "seleccionar", "cancelar");
- return true;
- }
- COMMAND:actor(playerid, params[]){
- if(IsPlayerInAnyVehicle(playerid))
- return SendClientMessage(playerid,-1,"{919BA4}INFO: no puedes utilizar el editor de actores desde un vehiculo!.");
- if(!creando_actors[playerid]){
- creando_actors[playerid]=true;
- SendClientMessage(playerid,-1,"{447900}INFO: sistema de creacion de actores, encendido.");
- CallLocalFunction("OnPlayerCommandText", "is", playerid, "/actorhelp");
- }else{
- creando_actors[playerid]=false;
- SendClientMessage(playerid,-1,"{A50000}INFO: sistema de creacion de actores, apagado.");
- }
- return true;
- }
- public OnFilterScriptInit(){
- AddPlayerClass(random(311),2074.5679,1208.1819,10.6719,2.4021,37,999999,38,999999,35,999999); //
- CreateVehicle(535, 2074.5679,1208.1819,10.6719,2.4021, random(200),random(200), 9999);
- return true;
- }
- stock HexToInt(string[]){
- if (string[0]==0) return 0;
- new i;
- new cur=1;
- new res=0;
- for (i=strlen(string);i>0;i--) {
- if (string[i-1]<58) res=res+cur*(string[i-1]-48); else res=res+cur*(string[i-1]-65+10);
- cur=cur*16;
- }return res;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement