Raised This Month: $ Target: $400
 0% 

New health every round


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
The Specialist
BANNED
Join Date: Nov 2006
Old 11-15-2006 , 18:00   Re: New health every round
Reply With Quote #3

here you go . this will add +10 on there first spawn. +20 on there second. and you can go up from there. basicly it increments the g_iRounds varaible every time the player spawns. (using VEN's theory of spawning ) . and then jsut get and set health. hope this helps
Code:
#include <amxmodx> #include <amxmisc> #include <fun> #define MAX_PLAYERS            32 new bool:g_restart_attempt[MAX_PLAYERS + 1] new g_iRounds[33]; public plugin_init() {  register_plugin("increase_health","0.1","The Specilaist");  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 } public event_restart_attempt() {  new players[32], num  get_players(players, num, "a")  for (new i; i < num; ++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) } public event_player_spawn(id) {  ++g_iRounds[id];    new health = get_user_health(id);    switch(g_iRounds[id])  {   case 0: set_user_health(id,(health + 10));   case 1: set_user_health(id,(health +20));  } }
The Specialist is offline
Send a message via AIM to The Specialist
 



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:59.


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