Mana System
Hey guys, I'm trying to build a plugin that gives Ts a certain amount of Mana which they can use by sending the command impulse 100. I am having a problem with set_task and remove_task
This is a function that I have to be activated every new round: Code:
public fwHamPlayerSpawnPost( iPlayer )Code:
register_event("DeathMsg", "removetask", "a")Code:
public removetask( id ) |
Re: Mana System
DeathMsg and HLTV don't have any params. Put the remove_task in Ham_Spawn and Ham_Killed.
|
Re: Mana System
That worked perfectly, thank you. So the reason it wasn't working before was that register_event wasn't sending the player's id to the function?
|
Re: Mana System
Yes. In DeathMsg, both the victim and killer ID's are accessible through the read_data function; in HLTV, you need to loop through all players.
|
Re: Mana System
Thanks a lot for the help, I really appreciate it!
|
| All times are GMT -4. The time now is 08:21. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.