Raised This Month: $ Target: $400
 0% 

Solved Scan Menu Editing


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SHIFT0
Senior Member
Join Date: Apr 2021
Location: Palestine
Old 08-20-2023 , 10:00   Scan Menu Editing
Reply With Quote #1

Can someone edit this
/scan
1. Choose Player To Scan
2.Unscan Player
When i choosed player he will be auto transfer to scan without chat
printchat [Scan Menu] Admin %s Asked % To Scan.
He can't join on teams he can leave server but he will get BANNED FOR 2 Weeks
he will see mothd how to scan
(WarGods) Post Scan Link on console ctrl + v
[WarGods] Player %s Was clean , Report Link



PHP Code:
/* WarGods Community
Plugin by: LiOn
Credits: DanN
Plugin: Comanda cerere wCD
 */
 
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
 
#define PLUGIN "Cerere wCD"
#define VERSION "1.1"
#define AUTHOR "DanN / LiOn"
 
#define TAG "[WarGods]"
 
#define MOTD_LOCATION "addons/amxmodx/configs/wcdinfo.html"
 
new bool:hascan[33], cvars[3]
new 
store_team
 
public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
 
    
register_clcmd("say""cmd_say")
    
register_clcmd("say_team""cmd_say")
 
    
cvars[0] = register_cvar("wcd_disconnect_ban""1")
    
cvars[1] = register_cvar("wcd_minim_acces_flag""c"// kick acces
    
cvars[2] = register_cvar("wcd_time_for_ban""1000")
 
    
register_dictionary("wcd_scan.txt")
}
 
public 
client_connect(id)
{
    
hascan[id] = false
}
 
public 
client_disconnect(id)
{
    if(
hascan[id] && get_pcvar_num(cvars[0]) == 1)
    {
        new 
ip[32]
        
get_user_ip(idipcharsmax(ip), 1)
 
        
hascan[id] = false
        server_print
("%s"ip)
        
client_cmd(0"spk ^"vox/bizwarn eliminated") 
        server_cmd("
addip %%s;writeip",get_pcvar_num(cvars[2]), ip)
        server_exec()
    }
}
 
 
public cmd_say(id)
{
    new szSaid[192]
    read_args(szSaid, charsmax(szSaid))
    remove_quotes(szSaid)
 
    if(contain(szSaid, "
/scan") != -1)
    {
        if(get_user_flags(id) & get_pcvar_flags(cvars[1]))
        {
            new target[32]
            copy(target, sizeof(target) -1, szSaid[6])
            new player = cmd_target(id, target, 2)
 
            if(player)
            {
                new pname[32], admin[32]
                get_user_name(player, pname, charsmax(pname))
                get_user_name(id, admin, charsmax(admin))
 
                if(hascan[player])
                {
                    ColorChat(id, "
%L", LANG_SERVER, "ALREADY_HAVE", TAG)
                    return PLUGIN_HANDLED
                }
                else
                {
                    new timer[64]
                    get_time("
%d/%m/%- %H:%M:%S", timer, charsmax(timer))
                    hascan[player] = true
                    store_team = get_user_team(player)
                    user_silentkill(player)
                    cs_set_user_team(player, CS_TEAM_SPECTATOR)
 
                    ColorChat(0, "
%L", LANG_SERVER, "MAKE_WCD", TAG, admin, pname, timer)
                    ColorChat(0, "
%L", LANG_SERVER, "DOWNLOAD_LINK", TAG)
                    ColorChat(0, "
%L", LANG_SERVER, "INFO_WCD", TAG)
                    client_cmd(id, "
snapshot")
                    return PLUGIN_CONTINUE
                }
            }
            else
            {
                ColorChat(id, "
%L", LANG_SERVER, "INVALID_PLAYER", TAG)
                return PLUGIN_HANDLED
            }
        }
    }
    else if(contain(szSaid, "
/clean") != -1)
    {
        if(get_user_flags(id) & get_pcvar_flags(cvars[1]))
        {
            new target[32]
            copy(target, charsmax(target), szSaid[7])
            new player = cmd_target(id, target, 2)
 
            if(player)
            {
                new pname[32]
                get_user_name(player, pname, charsmax(pname))
                cs_set_user_team(player, store_team)
                hascan[player] = false
 
                ColorChat(0, "
%L", LANG_SERVER, "PLAYER_CLEAN", TAG, pname)
                return PLUGIN_CONTINUE
            }
            else
            {
                ColorChat(id, "
%L", LANG_SERVER, "INVALID_PLAYER", TAG)
                return PLUGIN_HANDLED
            }
        }
    }
    else if(equal(szSaid, "
/infowcd") || equal(szSaid, "/wcd"))
    {
        show_motd(id, MOTD_LOCATION)
    }
 
    return PLUGIN_CONTINUE
}
 
 
 
stock ColorChat(const id, const input[], any:...)
{
    new Count = 1, Players[32];
    static Msg[191];
    vformat(Msg, 190, input, 3);
 
    replace_all(Msg, 190, "
!g", "^4");
    replace_all(Msg, 190, "
!y", "^1");
    replace_all(Msg, 190, "
!t", "^3");
 
    if(id) Players[0] = id; else get_players(Players, Count, "
ch");
    {
        for (new i = 0; i < Count; i++)
        {
            if (is_user_connected(Players[i]))
            {
                message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("
SayText"), _, Players[i]);
                write_byte(Players[i]);
                write_string(Msg);
                message_end();
            }
        }
    }
    return PLUGIN_HANDLED
}

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1036{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/ 
__________________
Thank You For Helps
Discord:
null.#0096
https://www.youtube.com/@NullHere/

Last edited by SHIFT0; 08-21-2023 at 17:15. Reason: SOLVED
SHIFT0 is offline
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 08-21-2023 , 00:14   Re: Scan Menu Editing
Reply With Quote #2

https://imgur.com/a/2gPdfgd
Code:
#include <amxmodx> #define print(%1,%2) client_print(%1,print_chat,%2) enum _:event_state{     none,     chosen,     submitted } new player_state[MAX_PLAYERS + 1] new scan_id[MAX_PLAYERS + 1][MAX_NAME_LENGTH] new url_matching[] = "google.com/search?q=" new str_state[][] = { "State : \wNone", "State : \yChosen", "State : \rSubmitted" } public plugin_init() {     register_clcmd("say /scan", "clcmd_scan")     register_clcmd("scan_menu", "clcmd_scan")     register_clcmd("say", "clcmd_say") } public client_authorized(id) {     player_state[id] = none     scan_id[id][0] = EOS } public client_disconnected(id) {     if (player_state[id] != none)     {         print(0, "%n left without submitting an url", id)         ban(id)     } } public clcmd_say(id) {     if (player_state[id] != chosen)     {         return PLUGIN_CONTINUE     }     static message[72]     read_args(message, charsmax(message))     remove_quotes(message)     new pos = contain(message, url_matching)     if (pos != -1)     {         player_state[id] = submitted         formatex(scan_id[id], charsmax(scan_id[]), message[pos+strlen(url_matching)])         print(id, "%s", (scan_id[id][0] == EOS) ? "Scan ID cannot be empty" : "Your url has been submitted")         return (scan_id[id][0] == EOS) ? PLUGIN_HANDLED : PLUGIN_CONTINUE     }     else     {         print(id, "Message cannot be sent: provide scan url")         return PLUGIN_HANDLED     } } public clcmd_scan(id) {     new players[MAX_PLAYERS], num, _id     get_players(players, num, "ch")     new menu = menu_create("Scan Menu", "menu_handler")     for (new i = 0; i < num; i++)     {         _id = players[i]         if (player_state[_id] == chosen && id != _id)         {             add_player_to_menu(menu, _id, player_state[_id])         }     }     for (new i = 0; i < num; i++)     {         _id = players[i]         if (player_state[_id] == submitted && id != _id)         {             add_player_to_menu(menu, _id, player_state[_id])         }     }     for (new i = 0; i < num; i++)     {         _id = players[i]         if (player_state[_id] == none && id != _id)         {             add_player_to_menu(menu, _id, player_state[_id])         }     }     menu_display(id, menu) } public menu_handler(id, menu, item) {     if (item != MENU_EXIT)     {         new info[8], temp         menu_item_getinfo(menu, item, temp, info, charsmax(info), "", 0, temp)         new _id = str_to_num(info)         if (is_user_connected(_id))         {             new submenu = menu_create(fmt("Selected \y%n^n\w%s", _id, str_state[player_state[_id]]), "submenu_handler")             switch (player_state[_id])             {                 case none : menu_additem(submenu, "Request scanning", fmt("%d", _id))                 case chosen : menu_additem(submenu, "Lift request", fmt("%d", _id))                 case submitted :                 {                     menu_additem(submenu, "Lift request", fmt("%d", _id))                     menu_additem(submenu, fmt("Scan ID: \y%s", scan_id[_id]), fmt("%d", _id))                 }             }             menu_display(id, submenu)         }     }     menu_destroy(menu) } public submenu_handler(id, menu, item) {     if (item != MENU_EXIT)     {         new info[8], temp         menu_item_getinfo(menu, item, temp, info, charsmax(info), "", 0, temp)         new _id = str_to_num(info)         if (is_user_connected(_id))         {             switch (item)             {                 case none :                 {                     switch (player_state[_id])                     {                         case none :                         {                             player_state[_id] = chosen                             print(0, "%n has asked %n to provide scan url", id, _id)                         }                         case chosen, submitted :                         {                             player_state[_id] = none                             print(_id, "%n has lifted scan request", id)                         }                     }                 }                 case chosen :                 {                     show_motd(id, fmt("http://%s%s", url_matching, scan_id[_id]), fmt("http://%s%s", url_matching, scan_id[_id]))                 }             }         }     }     menu_destroy(menu) } stock add_player_to_menu(menu, const who, const _event_state) {     switch (_event_state)     {         case none : menu_additem(menu, fmt("\w%n", who), fmt("%d", who))         case chosen : menu_additem(menu, fmt("\y%n", who), fmt("%d", who))         case submitted : menu_additem(menu, fmt("\r%n", who), fmt("%d", who))     } } stock ban(const who) {     server_print("banning %n", who)     return who ? true : false }
__________________
bigdaddy424 is offline
SHIFT0
Senior Member
Join Date: Apr 2021
Location: Palestine
Old 08-21-2023 , 14:10   Re: Scan Menu Editing
Reply With Quote #3

Quote:
Originally Posted by bigdaddy424 View Post
https://imgur.com/a/2gPdfgd
Code:
#include <amxmodx> #define print(%1,%2) client_print(%1,print_chat,%2) enum _:event_state{     none,     chosen,     submitted } new player_state[MAX_PLAYERS + 1] new scan_id[MAX_PLAYERS + 1][MAX_NAME_LENGTH] new url_matching[] = "google.com/search?q=" new str_state[][] = { "State : \wNone", "State : \yChosen", "State : \rSubmitted" } public plugin_init() {     register_clcmd("say /scan", "clcmd_scan")     register_clcmd("scan_menu", "clcmd_scan")     register_clcmd("say", "clcmd_say") } public client_authorized(id) {     player_state[id] = none     scan_id[id][0] = EOS } public client_disconnected(id) {     if (player_state[id] != none)     {         print(0, "%n left without submitting an url", id)         ban(id)     } } public clcmd_say(id) {     if (player_state[id] != chosen)     {         return PLUGIN_CONTINUE     }     static message[72]     read_args(message, charsmax(message))     remove_quotes(message)     new pos = contain(message, url_matching)     if (pos != -1)     {         player_state[id] = submitted         formatex(scan_id[id], charsmax(scan_id[]), message[pos+strlen(url_matching)])         print(id, "%s", (scan_id[id][0] == EOS) ? "Scan ID cannot be empty" : "Your url has been submitted")         return (scan_id[id][0] == EOS) ? PLUGIN_HANDLED : PLUGIN_CONTINUE     }     else     {         print(id, "Message cannot be sent: provide scan url")         return PLUGIN_HANDLED     } } public clcmd_scan(id) {     new players[MAX_PLAYERS], num, _id     get_players(players, num, "ch")     new menu = menu_create("Scan Menu", "menu_handler")     for (new i = 0; i < num; i++)     {         _id = players[i]         if (player_state[_id] == chosen && id != _id)         {             add_player_to_menu(menu, _id, player_state[_id])         }     }     for (new i = 0; i < num; i++)     {         _id = players[i]         if (player_state[_id] == submitted && id != _id)         {             add_player_to_menu(menu, _id, player_state[_id])         }     }     for (new i = 0; i < num; i++)     {         _id = players[i]         if (player_state[_id] == none && id != _id)         {             add_player_to_menu(menu, _id, player_state[_id])         }     }     menu_display(id, menu) } public menu_handler(id, menu, item) {     if (item != MENU_EXIT)     {         new info[8], temp         menu_item_getinfo(menu, item, temp, info, charsmax(info), "", 0, temp)         new _id = str_to_num(info)         if (is_user_connected(_id))         {             new submenu = menu_create(fmt("Selected \y%n^n\w%s", _id, str_state[player_state[_id]]), "submenu_handler")             switch (player_state[_id])             {                 case none : menu_additem(submenu, "Request scanning", fmt("%d", _id))                 case chosen : menu_additem(submenu, "Lift request", fmt("%d", _id))                 case submitted :                 {                     menu_additem(submenu, "Lift request", fmt("%d", _id))                     menu_additem(submenu, fmt("Scan ID: \y%s", scan_id[_id]), fmt("%d", _id))                 }             }             menu_display(id, submenu)         }     }     menu_destroy(menu) } public submenu_handler(id, menu, item) {     if (item != MENU_EXIT)     {         new info[8], temp         menu_item_getinfo(menu, item, temp, info, charsmax(info), "", 0, temp)         new _id = str_to_num(info)         if (is_user_connected(_id))         {             switch (item)             {                 case none :                 {                     switch (player_state[_id])                     {                         case none :                         {                             player_state[_id] = chosen                             print(0, "%n has asked %n to provide scan url", id, _id)                         }                         case chosen, submitted :                         {                             player_state[_id] = none                             print(_id, "%n has lifted scan request", id)                         }                     }                 }                 case chosen :                 {                     show_motd(id, fmt("http://%s%s", url_matching, scan_id[_id]), fmt("http://%s%s", url_matching, scan_id[_id]))                 }             }         }     }     menu_destroy(menu) } stock add_player_to_menu(menu, const who, const _event_state) {     switch (_event_state)     {         case none : menu_additem(menu, fmt("\w%n", who), fmt("%d", who))         case chosen : menu_additem(menu, fmt("\y%n", who), fmt("%d", who))         case submitted : menu_additem(menu, fmt("\r%n", who), fmt("%d", who))     } } stock ban(const who) {     server_print("banning %n", who)     return who ? true : false }
As i said when admin flag kick choosed player to scan ; 1. Choose Player To Scan
2. View How much player has scanned before if Clean / Cheater
chat will be
!g[Scan Menu] Admin %s Asked %s To Scan.
__________________
Thank You For Helps
Discord:
null.#0096
https://www.youtube.com/@NullHere/

Last edited by SHIFT0; 08-21-2023 at 14:10.
SHIFT0 is offline
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 08-21-2023 , 00:18   Re: Scan Menu Editing
Reply With Quote #4

i read this post omw home and it took a couple minutes to come up with this
in the video i took out id != _id condition so i would be able to select myself
__________________
bigdaddy424 is offline
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 08-21-2023 , 21:00   Re: Scan Menu Editing
Reply With Quote #5

i dont really understand what youre trying to say
__________________
bigdaddy424 is offline
SHIFT0
Senior Member
Join Date: Apr 2021
Location: Palestine
Old 08-21-2023 , 21:09   Re: Scan Menu Editing
Reply With Quote #6

Quote:
Originally Posted by bigdaddy424 View Post
i dont really understand what youre trying to say
Hh Done Bro its Solved by other friend scripter
Ty
__________________
Thank You For Helps
Discord:
null.#0096
https://www.youtube.com/@NullHere/
SHIFT0 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:44.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode