Raised This Month: $ Target: $400
 0% 

Help start round...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
elpouletorange
Senior Member
Join Date: Oct 2007
Old 10-21-2007 , 11:02   Re: Help start round...
Reply With Quote #1

So if a do:
PHP Code:
public event_player_spawn(id
{
    
set_user_health(idskill_strenght 5)
    
set_user_armor............
    ........................

at spawning the player get 101hp ??

or i should do:
PHP Code:
#define MAX_PLAYERS 32
new bool:g_restart_attempt[MAX_PLAYERS 1]
 
public 
plugin_init() {
    
register_event("ResetHUD""event_hud_reset""be")
    
register_clcmd("fullupdate""clcmd_fullupdate"
    
register_event("TextMsg""event_restart_attempt""a""2=#Game_will_restart_in")
}
 
public 
clcmd_fullupdate() {
    return 
PLUGIN_HANDLED_MAIN
}
 
public 
event_restart_attempt() {
    new 
players[32], num
    get_players
(playersnum"a")
    for (new 
inum; ++i)
        
g_restart_attempt[players[i]] = true
}
 
public 
event_hud_reset(id) {
    if (
g_restart_attempt[id]) {
        
g_restart_attempt[id] = false
        
return
    }
    
event_player_spawn(id)
}
 
// this function is called on player spawn
public event_player_spawn(id) {
    
set_user_health(idskill_strenght 5)
    
set_user_armor(idskill_defence 10)
    
set_user_gravity(id800 skill_dexterity 50)
    
set_user_maxspeed(id100 skill_agility 5)

and do this is correct ?
PHP Code:
skill_strenght(id) = skill_strenght(id) + 

Last edited by elpouletorange; 10-21-2007 at 11:16.
elpouletorange is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 10-21-2007 , 20:17   Re: Help start round...
Reply With Quote #2

Quote:
Originally Posted by elpouletorange View Post
and do this is correct ?
PHP Code:
skill_strenght(id) = skill_strenght(id) + 

No. First, you have to define it as being an array. So, you would have to define it like this.
PHP Code:
new skill_strenght[33]; 
Then, you would rewrite that line like this
PHP Code:
skill_strenght[id]++; 
OR
PHP Code:
skill_strenght[id] = skill_strenght[id] + 1
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou 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 01:23.


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