Raised This Month: $ Target: $400
 0% 

Need Help With code


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bat
Veteran Member
Join Date: Jul 2012
Old 11-24-2013 , 05:35   Re: Need Help With code
Reply With Quote #1

Test it...

Code:
#include <amxmodx> 
#include <amxmisc> 
#include <cstrike> 
#include <fun> 

#define PLUGIN "Day: Box" 
#define VERSION "1.0" 
#define AUTHOR "asdfdsdf" 

forward jailbreak_day_start(dayid) 
forward jailbreak_day_end() 
native jailbreak_day_add(name[32], description[200], blockguns, weapon, survivor, blockdamage) 


public plugin_precache( )  
{     
    precache_model("models/boxing_mod/v_box_red.mdl")   
    precache_model("models/player/boxing_models/boxing_models.mdl")
} 

new intDay, intMaxplayers 

public plugin_init()  
{ 
    register_plugin(PLUGIN, VERSION, AUTHOR) 
     
    // Add: Day 
    intDay = jailbreak_day_add("Box Day", "Terrorists needs to kill each other, surviver wins", 1, 0, 1, 1) 
     
    // Others 
    intMaxplayers = get_maxplayers() 
} 
public jailbreak_day_start(dayid) 
{ 
    if(dayid == intDay) 
    { 
        for(new i = 1; i <= intMaxplayers; i++) 
        { 
            if(is_user_alive(i)) 
            { 
                if(cs_get_user_team(i) == CS_TEAM_T) 
                { 
                    strip_user_weapons(i) 
                    give_item(i, "weapon_knife") 
                    cs_set_user_model(i, "boxing_models")
                    set_user_health(i, 400) 
                } 
            } 
        }         
        server_cmd("mp_friendlyfire 1") 
    } 
}

Last edited by bat; 11-24-2013 at 05:35.
bat is offline
Send a message via Skype™ to bat
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-24-2013 , 05:42   Re: Need Help With code
Reply With Quote #2

Edit ("Go Advanced" button) your title to something descriptive, everybody needs help with code.

And please take some time to read rules : https://forums.alliedmods.net/misc.php?do=showrules
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 11-24-2013 at 05:42.
ConnorMcLeod 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 23:17.


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