Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- .-E-Strlen creado por EnzoMetlc.
- FilterScript creado para 'Www.Forum.SA-MP.Com'
- */
- #include <a_samp>
- #include <zcmd>
- #define DIALOG_1 590
- #define DIALOG_2 591
- #define DIALOG_PREGUNTA 592
- #define DIALOG_PREGUNTA2 593
- #define DIALOG_SUB_FIN 594
- #define DIALOG_FIN 595
- public OnFilterScriptInit()
- {
- print("*** E-Strlen FS cargado correctamente.");
- print("*** .-By EnzoMetlc.");
- return 1;
- }
- new PlayerName[MAX_PLAYERS];
- new Celdas[MAX_PLAYERS];
- public OnPlayerSpawn(playerid)
- {
- SendClientMessage(playerid, -1, "*** Utiliza {FF0000}(/Strlen) {FFFFFF}para usar el FS.");
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch(dialogid)
- {
- case DIALOG_1:
- {
- if(response)
- {
- ShowPlayerDialog(playerid, DIALOG_PREGUNTA, DIALOG_STYLE_MSGBOX, "{00FFFF}E_Strlen.", \
- "{FFFFFF}Desea agregarle 'MAX_PLAYER_NAME' al Texto?.", "Sí", "No");
- }
- }
- case DIALOG_PREGUNTA:
- {
- if(response)
- {
- PlayerName[playerid] = 24;
- ShowPlayerDialog(playerid, DIALOG_PREGUNTA2, DIALOG_STYLE_MSGBOX, "{00FFFF}E_Strlen.", \
- "{FFFFFF}Desea agregar algunas Celdas al Texto?.", "Sí", "No");
- } else
- {
- PlayerName[playerid] = 0;
- ShowPlayerDialog(playerid, DIALOG_PREGUNTA2, DIALOG_STYLE_MSGBOX, "{00FFFF}E_Strlen.", \
- "{FFFFFF}Desea agregar algunas Celdas al Texto?.", "Sí", "No");
- }
- }
- case DIALOG_PREGUNTA2:
- {
- if(response)
- {
- Celdas[playerid] = strval(inputtext);
- ShowPlayerDialog(playerid, DIALOG_SUB_FIN, DIALOG_STYLE_INPUT,"{00FFFF}E_Strlen.", \
- "{FFFFFF}Introduzca las celdas que desea sumar.", "Continuar", "Cancelar");
- } else
- {
- ShowPlayerDialog(playerid, DIALOG_FIN, DIALOG_STYLE_INPUT, "{00FFFF}E_Strlen.", \
- "{FFFFFF}Ahora introduzca el Texto que desea optimizar.", "Continuar", "Cancelar");
- }
- }
- case DIALOG_SUB_FIN:
- {
- if(response)
- {
- Celdas[playerid] = strval(inputtext);
- ShowPlayerDialog(playerid, DIALOG_FIN, DIALOG_STYLE_INPUT, "{00FFFF}E_Strlen.", \
- "{FFFFFF}Ahora introduzca el Texto que desea optimizar.", "Continuar", "Cancelar");
- }
- }
- case DIALOG_FIN:
- {
- if(response)
- {
- new string[250];
- format(string, sizeof(string), "{FFFFFF}Si agregó el Nick, ocupa: {FF0000}+24{FFFFFF}. \n\n\
- Las celdas que agregó son: {FF0000}+%i{FFFFFF} \n\
- En total son: {FF0000}%i{FFFFFF} celdas.", Celdas[playerid], PlayerName[playerid] + Celdas[playerid] + strlen(inputtext));
- ShowPlayerDialog(playerid, 785, DIALOG_STYLE_MSGBOX, "{00FFFF}E_Strlen", string, "Aceptar", "");
- SendClientMessageToAll(-1, inputtext);
- }
- }
- }
- return 1;
- }
- CMD:strlen(playerid, params[])
- {
- PlayerName[playerid] = 0;
- Celdas[playerid] = 0;
- ShowPlayerDialog(playerid, DIALOG_1, DIALOG_STYLE_MSGBOX, "{00FFFF}E_Strlen.", \
- "{FFFFFF}Pulse 'Continuar' para hacer la optimización. \nDe lo contrario, pulse 'Cancelar'.", "Continuar", "Cancelar");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement