Raised This Month: $ Target: $400
 0% 

Wont give any nades.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 05-05-2012 , 12:46   Wont give any nades.
Reply With Quote #1

Hello there,

I tryed to make a dodgeball game, but this set_task wont give any he nades. Why wont it?


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

#include <amxmodx>
#include <fun>
#include <hamsandwich>
#include <colorchat>
#include <fakemeta>

#define PLUGIN "Dodgeball"
#define VERSION "1.0"
#define AUTHOR "Bilal"

new const Prefix[] = "[sG]"

new dodgeball[] = "models/sgknife/v_dodgeball.mdl";
new 
dodgeball2[] = "models/sgknife/p_dodgeball.mdl";

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /menu""CmdDodgeball")
}

public 
plugin_precache()
{
    
precache_model(dodgeball)
    
precache_model(dodgeball2)
}

public 
CmdDodgeball(id)
{
    new 
menu menu_create("Game:""MenuHandler")
    
    
menu_additem(menu"Dodgeball""1")
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL)
    
menu_display(idmenu0)
}

public 
MenuHandler(idmenuitem)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
data[6], szName[64], accescallback
    menu_item_getinfo
(menuitemaccesdatacharsmax(data), szNamecharsmax(szName), callback)
    new 
key str_to_num(data)
    
    switch(
key)
    {
        case 
1CmdDodgeball2(id)
        }
    return 
PLUGIN_HANDLED
}

public 
CmdDodgeball2(id)
{
    new 
name[32], players[32], iNum
    get_user_name
(idname31)
    
get_players(playersiNum"ch")
    
    for (new 
i<iNumi++)
    {
        
strip_user_weapons(players[i])
        
give_item(players[i], "weapon_hegrenade")
        
CmdDodgeball3(players[i])
        
set_pev(players[i], pev_viewmodel2dodgeball)
        
set_pev(players[i], pev_weaponmodel2dodgeball2)
    }
    
    
ColorChat(idGREY"%s ^4%s^1 has started the day: ^4Dodgeball"Prefixname)
}

public 
CmdDodgeball3(id)
{
    
set_task(0.5"GiveBalls"100_,_"b")
}

public 
GiveBalls(id)
{
    new 
players[32], iNum
    get_players
(playersiNum"a")
    
    for (new 
i<iNumi++)
    {
        if (!
is_user_alive(players[i]))
        {
            return 
PLUGIN_HANDLED
        
}
        if (!(
get_user_weapon(players[i]) == CSW_HEGRENADE))
        {
            
give_item(players[i], "weapon_hegrenade")
        }
    }
    return 
PLUGIN_CONTINUE

__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.

Last edited by Bilal Pro; 05-05-2012 at 12:53.
Bilal Pro is offline
 



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 00:24.


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