Raised This Month: $ Target: $400
 0% 

Bad Load - I can't see the reason


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 04-27-2005 , 11:32   Re: Bad Load - I can't see the reason
Reply With Quote #3

The main reason I think it fails to load is because you are trying to assign money to players that don't exist, and most importantly, you are doing it as soon as the plugin is initialized, and there will be 0 players in the server at that point..

You see, you are trying to give money to every player every 1/2 second, but you aren't checking if the player even exists!! I hope you understand what I mean..

Now, I am guessing that you want to give players money every time they spawn, is this correct?? You could just hook the ReseyHUD event, and then give players money there.. like:

Code:
#include <amxmodx> #include <cstrike> // Return values are ignored by this forward-function.. public plugin_init(){     register_plugin("SpawnMoney","1.0","smdobay")         // The "b" flag means that this event will be called for each player         register_event( "ResetHUD",  "Event_ResetHUD",  "b" )         //  Only 10 dollars??     register_cvar("sv_spawnmoney","10",FCVAR_SPONLY) } public Event_ResetHUD( id ) {         if( !is_user_alive( id ) )             return PLUGIN_CONTINUE         cs_set_user_money( id, cs_get_user_money(id) + get_cvar_num("sv_spawnmoney") )         return PLUGIN_CONTINUE }

Maybe something like that??
xeroblood is offline
Send a message via MSN to xeroblood
 



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 16:44.


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