Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Plugin generated by AMXX-Studio */
- #include <amxmodx>
- #include <amxmisc>
- #define PLUGIN "Tags"
- #define VERSION "0.1"
- #define AUTHOR "c4mp3r"
- #define TAG "wZ ' "
- new bool:has_tag[33];
- public plugin_init() {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- register_clcmd("say /tag", "settag")
- }
- public client_putinserver(id)
- {
- new name[32]
- get_user_name( id, name, 31 )
- if (!(containi(name, TAG) != -1))
- {
- set_task(20.0, "opentagmenu", id);
- }
- }
- public opentagmenu(id)
- {
- new line[110];
- new name[32]
- get_user_name( id, name, 31 )
- formatex(line, charsmax(line), "\w[\r wolvesZone\w ] - \yDesejas usar a nossa tag?^n\w[ %s\d %s ]^n", TAG, name)
- new tagmenu = menu_create(line, "sub_menu")
- menu_additem(tagmenu, "Sim", "1");
- menu_additem(tagmenu, "Nao", "2");
- menu_setprop(tagmenu, MPROP_EXIT, MEXIT_ALL);
- menu_display(id, tagmenu);
- }
- public sub_menu(id, tagmenu, item)
- {
- if (item == MENU_EXIT)
- {
- menu_destroy(tagmenu);
- return PLUGIN_HANDLED;
- }
- new Data[7], Name[64];
- new Access, Callback;
- menu_item_getinfo(tagmenu, item, Access, Data,5, Name, 63, Callback);
- new Key = str_to_num(Data);
- switch (Key)
- {
- case 1:
- settag(id)
- }
- menu_destroy(tagmenu);
- return PLUGIN_HANDLED;
- }
- public settag(id)
- {
- if(!(has_tag[id]))
- {
- new szName[32];
- get_user_name(id, szName, 31);
- client_cmd(id, "name ^"%s %s^"", TAG, szName)
- has_tag[id] = true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement