Raised This Month: $ Target: $400
 0% 

Need help with Last Request


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
izzle
Senior Member
Join Date: Aug 2009
Old 09-24-2009 , 16:32   Need help with Last Request
Reply With Quote #1

I have made a last request plugin that works, but I still need some help to make it so only the last terrorist alive can use it and it can only be used once until a player is killed, can someone please help? I'm a noob at coding :S
Here is what I have so far

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

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "Josh Moore"

public plugin_init()
{
    
register_plugin("izzlesLastRequest""1.1""izzle")
    
register_clcmd"say /lr","izzlesLastRequest");
}
public 
izzlesLastRequest(id)
{
    new 
menu menu_create("izzles Last Request:""menu_handler")
    
    
menu_additem(menu"Spray Contest""1"0);
    
menu_additem(menu"Shot 4 shot""2"0);
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu0);
}
public 
menu_handler(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);
    
    new 
key str_to_num(data);
    
    switch(
key)
    {
        case 
1:
        {
            
server_cmd("exec spraycontest.cfg")
            
client_printidprint_chat"You have selected spray contest" )
        }
        case 
2:
        {
            
server_cmd("exec shot4shot.cfg")
            
client_printidprint_chat"You have selected shot 4 shot" )
        }
    }
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;


Last edited by izzle; 09-24-2009 at 18:40.
izzle is offline
vitorrd
Senior Member
Join Date: Jul 2009
Old 09-24-2009 , 17:30   Re: Need help with Last Request
Reply With Quote #2

If you're gonna tell us your script works, at least fix the syntax errors, please.
vitorrd is offline
izzle
Senior Member
Join Date: Aug 2009
Old 09-24-2009 , 18:25   Re: Need help with Last Request
Reply With Quote #3

fixed
izzle 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 22:06.


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