Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- FilterScript
- Author: malaka | http://forum.sa-mp.com/member.php?u=112277
- Name: Simple FS to show flags
- Version: Float:2.0
- Desc: Shows a flag for all player on the server
- License: CC BY-NC | http://creativecommons.org/licenses/by-nc/3.0/
- Credits:
- * SA-MP Team
- * Creater of zcmd - Zeex (http://forum.sa-mp.com/showthread.php?t=91354)
- */
- // Includes
- #include <a_samp>
- #include <zcmd>
- // Defines
- #define DIALOG_FLAGS 7337
- #define FLAGS_DISPLAY_TIME 1000 * 5 // Flag will be shown for 5 seconds
- #define FLAGS_DISPLAY_STYLE 3 // Only use 3,4 and 5 if you want to change this
- // Global variables
- enum FDCountry
- {
- Name[20],
- String[140]
- }
- new CountryNames[][FDCountry] =
- {
- {"Germany","~l~]]]]]]]]]~n~~l~]]]]]]]]]~n~~r~]]]]]]]]]~n~~r~]]]]]]]]]~n~~y~]]]]]]]]]~n~~y~]]]]]]]]]"},
- {"France","~b~]]]~w~]]]~r~]]]~n~~b~]]]~w~]]]~r~]]]~n~~b~]]]~w~]]]~r~]]]~n~~b~]]]~w~]]]~r~]]]~n~~b~]]]~w~]]]~r~]]]"},
- {"Spain","~r~]]]]]]]]]~n~~r~]]]]]]]]]~n~~y~]]]]]]]]]~n~~y~]]]]]]]]]~n~~r~]]]]]]]]]~n~~r~]]]]]]]]]"},
- {"U.S.","~b~]]]~r~]]]]]]~n~~b~]]]~w~]]]]]]~n~~b~]]]~r~]]]]]]~n~~w~]]]]]]]]]~n~~r~]]]]]]]]]"},
- {"Italy","~g~]]]~w~]]]~r~]]]~n~~g~]]]~w~]]]~r~]]]~n~~g~]]]~w~]]]~r~]]]~n~~g~]]]~w~]]]~r~]]]~n~~g~]]]~w~]]]~r~]]]"},
- {"Netherlands","~r~]]]]]]]]]~n~~r~]]]]]]]]]~n~~w~]]]]]]]]]~n~~w~]]]]]]]]]~n~~b~]]]]]]]]]~n~~b~]]]]]]]]]"},
- {"Sweden","~b~]]]~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]]]]]]~n~~w~]]]]]]]]]~n~~g~]]]]]]]]]~n~~g~]]]]]]]]]"},
- {"Czech","~b~]~w~]]]]]]]]~n~~b~]]~w~]]]]]]]~n~~b~]]~r~]]]]]]]~n~~b~]~r~]]]]]]]]"},
- {"Luxembourg","~r~~h~]]]]]]]]]~n~~r~~h~]]]]]]]]]~n~~w~]]]]]]]]]~n~~w~]]]]]]]]]~n~~b~~h~]]]]]]]]]~n~~b~~h~]]]]]]]]]"},
- {"Latvia","~r~]]]]]]]]]~n~~r~]]]]]]]]]~n~~w~]]]]]]]]]~n~~r~]]]]]]]]]~n~~r~]]]]]]]]]"},
- {"Malta","~w~]]]]~r~]]]]~n~~w~]]]]~r~]]]]~n~~w~]]]]~r~]]]]~n~~w~]]]]~r~]]]]"},
- {"Portugal","~g~]]]~r~]]]]]~n~~g~]]]~r~]]]]]~n~~g~]]]~r~]]]]]~n~~g~]]]~r~]]]]]"},
- {"Estonia","~b~~h~]]]]]]]]]~n~~b~~h~]]]]]]]]]~n~~l~]]]]]]]]]~n~~l~]]]]]]]]]~n~~w~]]]]]]]]]~n~~w~]]]]]]]]]"},
- {"Bulgaria","~w~]]]]]]]]]~n~~w~]]]]]]]]]~n~~g~]]]]]]]]]~n~~g~]]]]]]]]]~n~~r~]]]]]]]]]~n~~r~]]]]]]]]]"},
- {"Belgium","~l~]]]~y~]]]~r~]]]~n~~l~]]]~y~]]]~r~]]]~n~~l~]]]~y~]]]~r~]]]~n~~l~]]]~y~]]]~r~]]]~n~~l~]]]~y~]]]~r~]]]"}
- };
- /* /flags command which is only accessable by RCON-Admins, feel free to change it to your own Admin System */
- COMMAND:flags(playerid,params[])
- {
- new
- CountryList[2000];
- for (new i = 0; i < sizeof(CountryNames); i++) {
- format(CountryList, sizeof(CountryList),"%s%s\n",CountryList,CountryNames[i][Name]);
- }
- if (IsPlayerAdmin(playerid)) ShowPlayerDialog(playerid,DIALOG_FLAGS,DIALOG_STYLE_LIST,"Select Country:",CountryList,"Select","Close");
- else
- return 0;
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if (dialogid == DIALOG_FLAGS) {
- if(!response) return 1;
- new
- FLAGS_DISPLAY_TEXT[256];
- if (strlen(CountryNames[listitem][Name]) > 3 && strlen(CountryNames[listitem][String]) > 5)
- {
- format(FLAGS_DISPLAY_TEXT, sizeof(FLAGS_DISPLAY_TEXT), "%s~n~~n~~w~%s",CountryNames[listitem][String],CountryNames[listitem][Name]);
- GameTextForAll(FLAGS_DISPLAY_TEXT, FLAGS_DISPLAY_TIME, FLAGS_DISPLAY_STYLE);
- } else {
- SendClientMessage(playerid,0xDCDCDCFF, "Invalid Selection");
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment