Raised This Month: $ Target: $400
 0% 

last request


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Toastt
BANNED
Join Date: Nov 2009
Old 12-29-2009 , 18:35   last request
Reply With Quote #1

i made this /lr
but during the event, they can "re use it"
like they'll type /lr again during an event and they get the menu and they can choose something else.
is there a code i can put in ?
Toastt is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-29-2009 , 19:03   Re: last request
Reply With Quote #2

Most likely you would be removing code. Post it here.
__________________
fysiks is offline
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 12-29-2009 , 20:03   Re: last request
Reply With Quote #3

use a bool

new bool:IsInLR

or whatever.
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
Toastt
BANNED
Join Date: Nov 2009
Old 12-29-2009 , 21:31   Re: last request
Reply With Quote #4

whats a bool?
Toastt is offline
Toastt
BANNED
Join Date: Nov 2009
Old 12-29-2009 , 21:33   Re: last request
Reply With Quote #5

Quote:
Originally Posted by DarkGod View Post
use a bool

new bool:IsInLR

or whatever.
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <fakemeta_util>

new g_iMaxPlayers

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
register_event("HLTV""event_round_start""a""1=0""2=0");
    
register_clcmd("say /lr""duelo_menu");
    
register_clcmd("say !lr""duelo_menu");
    
register_clcmd("say_team /lr""duelo_menu");
    
register_clcmd("say_team !lr""duelo_menu");
    
g_iMaxPlayers get_maxplayers()
}

public 
event_round_start()
{
    for (new 
idid <= g_iMaxPlayersid++)
    {    
    
fm_set_rendering(idkRenderFxGlowShell000kRenderNormal20)
    }
}

public 
duelo_menu(id)
{    
    if (
cs_get_user_team(id) != CS_TEAM_T || !is_user_alive(id))
    {
        return 
PLUGIN_HANDLED;
    }

    new 
ctCounttrCount;
    
    for (new 
1<= g_iMaxPlayersi++)
    {
        if (!
is_user_alive(i))
        {
            continue;
        }
        
        switch (
cs_get_user_team(i))
        {
            case 
CS_TEAM_CT:
            {
                
ctCount++;
            }
            
            case 
CS_TEAM_T:
            {
                
trCount++;
            }
        }
    }

    if (
trCount 1)
    {
        return 
PLUGIN_HANDLED;
    }
    
    if (
ctCount == 0)
    {
        return 
PLUGIN_HANDLED;
    }
    if(
get_user_team(id) == )
    {
        new 
duelomenu menu_create("\yLast Request:""sub_duelo_menu")
        
        
menu_additem(duelomenu"\w1on1 Knife""1"0);
        
menu_additem(duelomenu"\wGun Toss""2"0);
        
menu_additem(duelomenu"\wGrenades Duel""3"0);
        
menu_additem(duelomenu"\wScout Duel""4"0);
        
        
menu_setprop(duelomenuMPROP_EXITMEXIT_ALL);
        
menu_display(idduelomenu0);
    }

    return 
PLUGIN_HANDLED;
}

public 
sub_duelo_menu(idduelomenuitem)
{
    
    if (
item == MENU_EXIT)
    {
        
menu_destroy(duelomenu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
Data[6], Name[64];
    new 
AccessCallback;
    
menu_item_getinfo(duelomenuitemAccessData,5Name63Callback);
        
    new 
Key str_to_num(Data);
    
    switch (
Key)
    {
        case 
1:
        {
            
menu(id)
        }
        case 
2
        {
            
menu2(id)
        }
        case 
3
        {
            
menu3(id)
        }
        case 
4
        {
            
menu4(id)
        }
    }

    
menu_destroy(duelomenu);

    return 
PLUGIN_HANDLED;
}

 public 
menu(id)
{

    new 
menu menu_create("\yChoose player to do request:""submenu");

     new 
players[32], pnumtempid;
    new 
szName[32], szTempid[10];

    
get_players(playerspnum"a");

    for( new 
ii<pnumi++ )
    {
        
tempid players[i];
        
        if (
cs_get_user_team(tempid) != CS_TEAM_CT)
        {
            continue;
        }
        
        
get_user_name(tempidszName31);
        
num_to_str(tempidszTempid9);
        
menu_additem(menuszNameszTempid0);
    }
    
    
menu_display(idmenu);
    return 
PLUGIN_HANDLED;
}

public 
submenu(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }

    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);

    new 
tempid str_to_num(data);
    
strip_user_weapons(tempid);
    
give_item(tempid"weapon_knife");
    
fm_set_rendering(tempidkRenderFxGlowShell00250kRenderNormal20);
    
    
strip_user_weapons(id);
    
set_user_health(id100);
    
give_item(id"weapon_knife");
    
fm_set_rendering(idkRenderFxGlowShell25000kRenderNormal20);        
            
    new 
szName[32], szName2[32];
    
get_user_name(idszName31);
    
get_user_name(tempidszName231);
    
set_hudmessage02550, -1.00.4025.08.00.00.010);
    
show_hudmessage(0"%s vs %s^n Knife Duel"szNameszName2);
        
    if( 
is_user_alive(tempid) )
        
set_user_health(tempid100);
    
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
 }
 
 public 
menu2(id)
{
    new 
menu menu_create("\yChoose player to fight:""submenu2");
    
     new 
players[32], pnumtempid;
    new 
szName[32], szTempid[10];

    
get_players(playerspnum"a");

    for( new 
ii<pnumi++ )
    {
        
tempid players[i];
        
        if (
cs_get_user_team(tempid) != CS_TEAM_CT)
        {
            continue;
        }
        
        
get_user_name(tempidszName31);
        
num_to_str(tempidszTempid9);
        
menu_additem(menuszNameszTempid0);
    }
    
    
menu_display(idmenu);
    return 
PLUGIN_HANDLED;
}

public 
submenu2(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }

    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);

    new 
tempid str_to_num(data);
    
strip_user_weapons(tempid);
    
give_item(tempid"weapon_deagle");
    
cs_set_user_bpammo(tempid,CSW_DEAGLE,0)
    
fm_set_rendering(tempidkRenderFxGlowShell00250kRenderNormal20)
    
    
strip_user_weapons(id)
    
set_user_health(id100)
    
give_item(id"weapon_deagle")
    
cs_set_user_bpammo(id,CSW_DEAGLE,0)
    
fm_set_rendering(idkRenderFxGlowShell25000kRenderNormal20)
            
    new 
szName[32], szName2[32]
    
get_user_name(idszName31);
    
get_user_name(tempidszName231);
    
set_hudmessage02550, -1.00.4025.08.00.00.010)
    
show_hudmessage(0"%s vs %s^n Gun Toss",szNameszName2)   

    if( 
is_user_alive(tempid) )
        
set_user_health(tempid100);
    
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
 }
 
 public 
menu3(id)
{
    
    new 
menu menu_create("\yChoose player to fight:""submenu3");

     new 
players[32], pnumtempid;
    new 
szName[32], szTempid[10];

    
get_players(playerspnum"a");

    for( new 
ii<pnumi++ )
    {
        
tempid players[i];
        
        if (
cs_get_user_team(tempid) != CS_TEAM_CT)
        {
            continue;
        }
        
        
get_user_name(tempidszName31);
        
num_to_str(tempidszTempid9);
        
menu_additem(menuszNameszTempid0);
    }
    
    
menu_display(idmenu);
    return 
PLUGIN_HANDLED;
}

public 
submenu3(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }

    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);

    new 
tempid str_to_num(data);
    
strip_user_weapons(tempid);
    
give_item(tempid"weapon_hegrenade");
    
cs_set_user_bpammo(tempid,CSW_HEGRENADE,8)
    
fm_set_rendering(tempidkRenderFxGlowShell00250kRenderNormal20)
    
    
strip_user_weapons(id)
    
set_user_health(id100)
    
give_item(id"weapon_hegrenade")
    
cs_set_user_bpammo(id,CSW_HEGRENADE,8)
    
fm_set_rendering(idkRenderFxGlowShell25000kRenderNormal20)

    new 
szName[32], szName2[32]
    
get_user_name(idszName31);
    
get_user_name(tempidszName231);
    
set_hudmessage02550, -1.00.4025.08.00.00.010)
    
show_hudmessage(0"%s vs %s^n Grenades Duel",szNameszName2


    if( 
is_user_alive(tempid) )
        
set_user_health(tempid100);
    
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
 }
 
 public 
menu4(id)
{
    new 
menu menu_create("\yChoose player to fight:""submenu4");

     new 
players[32], pnumtempid;
    new 
szName[32], szTempid[10];

    
get_players(playerspnum"a");

    for( new 
ii<pnumi++ )
    {
        
tempid players[i];
        
        if (
cs_get_user_team(tempid) != CS_TEAM_CT)
        {
            continue;
        }
        
        
get_user_name(tempidszName31);
        
num_to_str(tempidszTempid9);
        
menu_additem(menuszNameszTempid0);
    }
    
    
menu_display(idmenu);
    return 
PLUGIN_HANDLED;
}

public 
submenu4(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }

    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);

    new 
tempid str_to_num(data);
    
strip_user_weapons(tempid);
    
give_item(tempid"weapon_scout");
    
cs_set_user_bpammo(tempid,CSW_SCOUT,10)
    
fm_set_rendering(tempidkRenderFxGlowShell00250kRenderNormal20)
    
    
strip_user_weapons(id)
    
set_user_health(id100)
    
give_item(id"weapon_scout")
    
cs_set_user_bpammo(id,CSW_SCOUT,10)
    
fm_set_rendering(idkRenderFxGlowShell25000kRenderNormal20)            
            
    new 
szName[32], szName2[32]
    
get_user_name(idszName31);
    
get_user_name(tempidszName231);
    
set_hudmessage02550, -1.00.4025.08.00.00.010)
    
show_hudmessage(0"%s vs %s^n Scout Duel",szNameszName2)    

    if( 
is_user_alive(tempid) )
        
set_user_health(tempid100);
    
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;

Toastt is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-29-2009 , 22:03   Re: last request
Reply With Quote #6

Quote:
Originally Posted by DarkGod View Post
use a bool

new bool:IsInLR

or whatever.
Well, technically we shouldn't be giving him any advice since he does not ask a question. I interpreted it exactly opposite from what you did .

Quote:
Originally Posted by Toastt View Post
whats a bool?
Learn to edit your freaking post.
__________________
fysiks is offline
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 12-29-2009 , 22:16   Re: last request
Reply With Quote #7

wow toast did u really make it. Nop u didnt u stole it again !!!
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
Toastt
BANNED
Join Date: Nov 2009
Old 12-29-2009 , 22:31   Re: last request
Reply With Quote #8

Quote:
Originally Posted by shuttle_wave View Post
wow toast did u really make it. Nop u didnt u stole it again !!!
well mines basically the same thing, with more events
i just didnt want to give them out.
Toastt is offline
platzpatrone
Veteran Member
Join Date: Apr 2007
Location: Germany
Old 12-29-2009 , 23:42   Re: last request
Reply With Quote #9

Quote:
Originally Posted by Toastt View Post
well mines basically the same thing, with more events
i just didnt want to give them out.
if u created ur own, why not posting those code then ?
u need help for things and not posted the right code, why ?
thought that u dont created your own on scratch, did u ?

and well, u didnt answer fysiks question
platzpatrone is offline
MouseSplash!
Veteran Member
Join Date: Dec 2009
Location: En Tu Mente!
Old 12-29-2009 , 23:44   Re: last request
Reply With Quote #10

the REAL AUTOR is RUBEEN!!! shit...
he is furios because all peaplo change the autor and dont go update this lr...

http://forums.alliedmods.net/showthr...=ultimo+pedido
MouseSplash! is offline
Reply


Thread Tools
Display Modes

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 04:14.


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