Raised This Month: $ Target: $400
 0% 

[req] start round bonus


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tfk94
Veteran Member
Join Date: Jan 2011
Location: [url=http://www.gametrac
Old 04-11-2016 , 09:33   [req] start round bonus
Reply With Quote #1

hi all i need a plugin which at the start of the round gives someone 100 hp
like
This round the lucky player is tfk. He wins 100 hp
and every round the winner to be a different person
10x
tfk94 is offline
Awesome_man
Senior Member
Join Date: May 2014
Location: singapore
Old 04-11-2016 , 09:58   Re: [req] start round bonus
Reply With Quote #2

Quote:
Originally Posted by tfk94 View Post
hi all i need a plugin which at the start of the round gives someone 100 hp
like
This round the lucky player is tfk. He wins 100 hp
and every round the winner to be a different person
10x

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

public plugin_init()     
    
register_event("HLTV""health""a""1=0""2=0")  

public 
health() 
{         
    new 
users[32], count;    
    
get_players(userscount"a");    

    if(
count)              
    {
        new 
iplayers players[random(count)];
        
        new 
iName[32];
        
get_user_name(iplayersiNamecharsmax(iName))
     
        
set_user_health(iplayersget_user_health(iplayers) + 100);
        
        
client_print(0print_chat"Player %s just received 100 hp as a bonus..."iName);
    }


Last edited by Awesome_man; 04-11-2016 at 10:02.
Awesome_man is offline
tfk94
Veteran Member
Join Date: Jan 2011
Location: [url=http://www.gametrac
Old 04-11-2016 , 10:39   Re: [req] start round bonus
Reply With Quote #3

10x
tfk94 is offline
tfk94
Veteran Member
Join Date: Jan 2011
Location: [url=http://www.gametrac
Old 04-11-2016 , 14:24   Re: [req] start round bonus
Reply With Quote #4

sorry for double post but i compile it now and
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

/tmp/textD6IJEW.sma(14) : error 017: undefined symbol "players"
/tmp/textD6IJEW.sma(14) : error 001: expected token: ";", but found "]"
/tmp/textD6IJEW.sma(14) : error 029: invalid expression, assumed zero
/tmp/textD6IJEW.sma(14) : fatal error 107: too many error messages on one line

Compilation aborted.
4 Errors.
tfk94 is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 04-13-2016 , 10:29   Re: [req] start round bonus
Reply With Quote #5

Line 14:

PHP Code:
new iplayers players[random(count)]; 
change to

PHP Code:
new iplayers users[random(count)]; 
__________________
Thanks everyone. #miss_you_all
indraraj striker 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 19:20.


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