Raised This Month: $ Target: $400
 0% 

[REQ] ran def kit


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-28-2017 , 13:07   Re: [REQ] ran def kit
Reply With Quote #1

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

public plugin_init()
{
    
register_plugin("Random Defuse Kit""1.0""OciXCrom @ alliedmods.net")
    
register_logevent("OnRoundStart"2"1=Round_Start")
}

public 
OnRoundStart()
{
    new 
iPlayers[32], iPnum
    get_players
(iPlayersiPnum"ae""CT")
    
    if(
iPnum)
    {
        new 
iPlayer iPlayers[random(iPnum)]
        
give_item(iPlayer"item_thighpack")
        
        new 
szName[32]
        
get_user_name(iPlayerszNamecharsmax(szName))
        
client_print(0print_chat"* %s received a free defuse kit."szName)
    }

__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 01-29-2017 , 13:16   Re: [REQ] ran def kit
Reply With Quote #2

Quote:
Originally Posted by OciXCrom View Post
#include <amxmodx>
#include <fun>

public plugin_init()
{
register_plugin("Random Defuse Kit", "1.0", "OciXCrom @ alliedmods.net")
register_logevent("OnRoundStart", 2, "1=Round_Start")
}

public OnRoundStart()
{
new iPlayers[32], iPnum
get_players(iPlayers, iPnum, "ae", "CT")

if(iPnum)
{
new iPlayer = iPlayers[random(iPnum)]
give_item(iPlayer, "item_thighpack")

new szName[32]
get_user_name(iPlayer, szName, charsmax(szName))
client_print(0, print_chat, "* %s received a free defuse kit.", szName)
}
}
What's that for ?
__________________

Last edited by edon1337; 01-29-2017 at 13:16.
edon1337 is offline
blanko
Senior Member
Join Date: Aug 2008
Old 01-29-2017 , 22:29   Re: [REQ] ran def kit
Reply With Quote #3

Thank you, OciXCrom! If I wanna randomize this and plus another item too, wanna do I need to change so the two plugins won't conflict each other?
__________________
blanko 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 02:01.


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