Raised This Month: $ Target: $400
 0% 

What's wrong with my code?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 08-07-2009 , 04:30   Re: What's wrong with my code?
Reply With Quote #5

Maybe something like this:

PHP Code:
#include <amxmodx>
#include <fun>

#define PLUGIN "JailMod"
#define VERSION "1.0"
#define AUTHOR "elemeNt;"

new g_MaxPlayers

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event("HLTV""event_new_round""a""1=0""2=0")   
    
register_logevent("logevent_round_end"2"1=Round_End")  
    
    
g_MaxPlayers get_maxplayers()
}

public 
event_new_round()
{
    for(new 
i=1i<=g_MaxPlayersi++)
    {
        if(
is_user_alive(i) )
        {
            if (
get_user_team(i) == 2)
            {
                
strip_user_weapons(i)
                
give_item(i,"weapon_m4a1")
                
give_item(i,"ammo_556nato")
                
give_item(i,"ammo_556nato")
                
give_item(i,"ammo_556nato")
                
give_item(i,"weapon_deagle")
                
give_item(i,"ammo_50ae")
                
give_item(i,"ammo_50ae")
                
give_item(i,"ammo_50ae")
                
give_item(i,"ammo_50ae")
                
give_item(i,"ammo_50ae")
                
give_item(i,"ammo_50ae")
                
give_item(i,"ammo_50ae")
                
give_item(i,"weapon_knife")
                
give_item(i,"weapon_hegrenade")
            }
            else
            {
                
strip_user_weapons(i)
                
give_item(i,"weapon_knife")
            }
        }
    } 
    return 
PLUGIN_CONTINUE
}

public 
logevent_round_end()
{
    for(new 
i=1i<=g_MaxPlayersi++)
    {
        if(
is_user_alive(i) )
        {
            
strip_user_weapons (i)
            
give_item(i,"weapon_knife")
        }
    }    

__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
 



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


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