Raised This Month: $51 Target: $400
 12% 

[REQ] Simple And Easy Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
5aloOod
Senior Member
Join Date: Jun 2013
Location: hell
Old 01-31-2014 , 12:28   [REQ] Simple And Easy Plugin
Reply With Quote #1

Hello everybody

i need a simple plugin that wil exec all players to "say /jb_commands" in every respawn

need your help
thanks
5aloOod is offline
joshknifer
Veteran Member
Join Date: Jun 2011
Location: Denver, CO
Old 01-31-2014 , 12:37   Re: [REQ] Simple And Easy Plugin
Reply With Quote #2

The best way to do that would be within the plugin itself. You can set it up so the menu automatically displays to all clients on spawn. What plugin are you using?
__________________
joshknifer is offline
Send a message via Skype™ to joshknifer
5aloOod
Senior Member
Join Date: Jun 2013
Location: hell
Old 01-31-2014 , 12:42   Re: [REQ] Simple And Easy Plugin
Reply With Quote #3

this
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>

public plugin_init()
{
    
register_plugin("jb commands Menu""1.0""devix");
    
register_clcmd("say /jb_commands""ShowMenu"_"- Brings up Mods Menu");
}

public 
ShowMenu(id)
{
    new 
menu menu_create("Jailbreak Commands!""ModsMenu_Handler");

    
menu_additem(menu"\y/simon \d(\rBe The Simon!\d)^n\r(\dFor Guards\r)"""0); // case 0
    
menu_additem(menu"\y/fd \d(\rFreeDay Menu!\d)^n\r(\dFor Guards\r)"""0); // case 1
    
menu_additem(menu"\y/nomic\d(\rIf You Dont Have Mic In CT!\d)^n\r(\dFor Guards\r)"""0); // case 2
    
menu_additem(menu"\y/daysmenu \d(\rStart Up A Day!\d)^n\r(\dFor Guards\r)"""0); // case 3
    
menu_additem(menu"\y/box \d(\rEnable Box Mod!\d)^n\r(\dFor Guards\r)"""0); // case 4
    
menu_additem(menu"\y/open \d(\rOpen Jails!\d)^n\r(\dFor Guards\r)"""0); // case 5
    
menu_additem(menu"\y/shop \d(\rShop Menu!\d)^n\r(\dFor Prisoners\r)"""0); // case 6
    
menu_additem(menu"\y/lr \d(\rLast Requset Menu!\d)^n\r(\dFor Prisoners\r)"""0); // case 7
    
menu_additem(menu"\y/voice \d(\rTeam Voice Control!\d)^n\r(\dFor Admins\r)"""0); // case 8
    
menu_additem(menu"\y/jb_voice \d(\rGive The Abilty To Talk!\d)^n\r(\dFor Admins\r)"""0); // case 9
    
menu_additem(menu"\y/rs \d(\rRest Your Score!\d)^n\r(\dFor All Players\r)"""0); // case 10
    
menu_additem(menu"\y/help \d(\rHUD help messages!\d)^n\r(\dFor All Players\r)"""0); // case 11
   
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_setprop(menuMPROP_BACKNAME"\wBack");
    
menu_setprop(menuMPROP_NEXTNAME"\wNext");
    
menu_setprop(menuMPROP_EXITNAME"\wExit");
    
menu_setprop(menuMPROP_NOCOLORS1);

    
menu_display(idmenu0);

    return 
PLUGIN_HANDLED;
}

public 
ModsMenu_Handler(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_cancel(id);
        return 
PLUGIN_HANDLED;
    }

    new 
command[6], name[64], accesscallback;

    
menu_item_getinfo(menuitemaccesscommandsizeof command 1namesizeof name 1callback);

    switch(
item)
    {
        case 
0client_cmd(id"say /simon");
        case 
1client_cmd(id"say /fd");
        case 
2client_cmd(id"say /nomic");
        case 
3client_cmd(id"say /daysmenu");
        case 
4client_cmd(id"say /box");
        case 
5client_cmd(id"say /open");
        case 
6client_cmd(id"say /shop");
        case 
7client_cmd(id"say /lr");
        case 
8client_cmd(id"say /voice");
        case 
9client_cmd(id"say /jb_voice");
        case 
10client_cmd(id"say /rs");
        case 
11client_cmd(id"say /help");
    }

    
menu_destroy(menu);

    return 
PLUGIN_HANDLED;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/ 
5aloOod is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-31-2014 , 12:49   Re: [REQ] Simple And Easy Plugin
Reply With Quote #4

Code:
/* Plugin generated by AMXX-Studio */ 

#include <amxmodx> 
#include <hamsandwich>

public plugin_init() 
{ 
    register_plugin("jb commands Menu", "1.0", "devix"); 
    register_clcmd("say /jb_commands", "ShowMenu", _, "- Brings up Mods Menu"); 
    RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)
} 

public ShowMenu(id) 
{ 
    new menu = menu_create("Jailbreak Commands!", "ModsMenu_Handler"); 

    menu_additem(menu, "\y/simon \d(\rBe The Simon!\d)^n\r(\dFor Guards\r)", "", 0); // case 0 
    menu_additem(menu, "\y/fd \d(\rFreeDay Menu!\d)^n\r(\dFor Guards\r)", "", 0); // case 1 
    menu_additem(menu, "\y/nomic\d(\rIf You Dont Have Mic In CT!\d)^n\r(\dFor Guards\r)", "", 0); // case 2 
    menu_additem(menu, "\y/daysmenu \d(\rStart Up A Day!\d)^n\r(\dFor Guards\r)", "", 0); // case 3 
    menu_additem(menu, "\y/box \d(\rEnable Box Mod!\d)^n\r(\dFor Guards\r)", "", 0); // case 4 
    menu_additem(menu, "\y/open \d(\rOpen Jails!\d)^n\r(\dFor Guards\r)", "", 0); // case 5 
    menu_additem(menu, "\y/shop \d(\rShop Menu!\d)^n\r(\dFor Prisoners\r)", "", 0); // case 6 
    menu_additem(menu, "\y/lr \d(\rLast Requset Menu!\d)^n\r(\dFor Prisoners\r)", "", 0); // case 7 
    menu_additem(menu, "\y/voice \d(\rTeam Voice Control!\d)^n\r(\dFor Admins\r)", "", 0); // case 8 
    menu_additem(menu, "\y/jb_voice \d(\rGive The Abilty To Talk!\d)^n\r(\dFor Admins\r)", "", 0); // case 9 
    menu_additem(menu, "\y/rs \d(\rRest Your Score!\d)^n\r(\dFor All Players\r)", "", 0); // case 10 
    menu_additem(menu, "\y/help \d(\rHUD help messages!\d)^n\r(\dFor All Players\r)", "", 0); // case 11 
    
    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL); 
    menu_setprop(menu, MPROP_BACKNAME, "\wBack"); 
    menu_setprop(menu, MPROP_NEXTNAME, "\wNext"); 
    menu_setprop(menu, MPROP_EXITNAME, "\wExit"); 
    menu_setprop(menu, MPROP_NOCOLORS, 1); 

    menu_display(id, menu, 0); 

    return PLUGIN_HANDLED; 
} 

public ModsMenu_Handler(id, menu, item) 
{ 
    if(item == MENU_EXIT) 
    { 
        menu_cancel(id); 
        return PLUGIN_HANDLED; 
    } 

    new command[6], name[64], access, callback; 

    menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback); 

    switch(item) 
    { 
        case 0: client_cmd(id, "say /simon"); 
        case 1: client_cmd(id, "say /fd"); 
        case 2: client_cmd(id, "say /nomic"); 
        case 3: client_cmd(id, "say /daysmenu"); 
        case 4: client_cmd(id, "say /box"); 
        case 5: client_cmd(id, "say /open"); 
        case 6: client_cmd(id, "say /shop"); 
        case 7: client_cmd(id, "say /lr"); 
        case 8: client_cmd(id, "say /voice"); 
        case 9: client_cmd(id, "say /jb_voice"); 
        case 10: client_cmd(id, "say /rs"); 
        case 11: client_cmd(id, "say /help"); 
    } 

    menu_destroy(menu); 

    return PLUGIN_HANDLED; 
} 

public fwHamPlayerSpawnPost(id)
{
    ShowMenu(id)
}


/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE 
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par } 
*/
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou 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 17:55.


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