Raised This Month: $ Target: $400
 0% 

Adding up


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
SaM.ThE.MaN
Senior Member
Join Date: Jan 2010
Old 10-14-2010 , 07:30   Adding up
Reply With Quote #1

Hi...

I was working on something , like example :

So first we have a number g_Number[33] which is = 500 ...

Then it shows an hud Message : Energy : g_Number[33] which is 500

Then each 5 seconds ... the g_Number[33] is supposed to increase by 10 , which means its supposed to be 511 ... The hud should show 511 ... but it still shows me 500 .. No errors or warnings, everything runs properly..

Guess : My guess is because i have already done this new g_Number[33] = 500 , it only shows 500 , but not sure , Help ..

Script :

PHP Code:
#include <amxmodx> 

new g_Number[33] = 500 

#define PLUGIN "New Plug-In" 
#define VERSION "1.0" 
#define AUTHOR "Sam" 


public plugin_init() 

    
register_plugin(PLUGINVERSIONAUTHOR
     
    
// Tasks 
    
    
set_task(0.1"ShowNumber",_,_,_"b"
    
set_task(5.0"IncreaseNumber",_,_,_"b"


public 
ShowNumber(id

    
set_hudmessage(021300.600.9401.01.0
    
show_hudmessage(id"Number: %i"g_Number[id]) 


public 
IncreaseNumber(id

    if(
is_user_connected(id) ) 
    { 
        
g_Number[id] = g_Number[id] + 10 
    


__________________
  • Project : Level Plugin
o [||||||||||] - 100%
  • Project : OnePieceMod
o [||||||||||] - 20%
SaM.ThE.MaN is offline
 



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 10:19.


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