Raised This Month: $ Target: $400
 0% 

solved~close


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lucky109
Senior Member
Join Date: Jan 2005
Old 04-15-2007 , 16:47   solved~close
Reply With Quote #1

solved~close

Last edited by lucky109; 04-15-2007 at 17:47. Reason: solved~close
lucky109 is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 04-15-2007 , 16:58   Re: Random ID on Every New Round ~
Reply With Quote #2

sorry for a shitty response at a basketball game ( clippers ). what I would do is.
get_players then do a random(1, players).


Quote:
Originally Posted by lucky109 View Post
Ok,im trying to pick 1 player randomly each round , and giveitem AWP to him. and the AWP 3 ammo only . but this doesnt seem to work. Thanks


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

public plugin_init() {
 register_event("ResetHUD","test","b") 
 return PLUGIN_HANDLED
}

public test() {
set_task(5.0,"random_player")
}

public random_player() {
new iPlayers[32], iNum
get_players( iPlayers, iNum )
new id, i
for( i = 0; i < iNum; i++ )
{
    id = iPlayers[i]
    give_item(id, "weapon_awp")
}
Styles is offline
Send a message via AIM to Styles
Dark Kingdom
BANNED
Join Date: Apr 2007
Location: VT
Old 04-15-2007 , 17:06   Re: Random ID on Every New Round ~
Reply With Quote #3

This is untested but compiles

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

public plugin_init()
{
    
register_event("ResetHUD","test","b")
}

public 
test(id)
{
    
set_task(5.0,"random_player")
    return 
PLUGIN_HANDLED
}

public 
random_player(id)
{
    new 
iPlayers[32], iNum
    get_players
iPlayersiNum )
    new 
idi
    
for( 0iNumi++ )
        
    
id iPlayers[i]
    
give_item(id"CSW_AWP")

Dark Kingdom is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-15-2007 , 18:34   Re: solved~close
Reply With Quote #4

Try this.

You have to compile on your pc because fakemeta_utils is necessary.

You can change ammo in the .sma file : #define AMMO_AWP 3
Attached Files
File Type: zip random_awp.zip (12.3 KB, 69 views)
__________________

Last edited by Arkshine; 04-15-2007 at 18:38.
Arkshine 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 06:36.


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