Raised This Month: $ Target: $400
 0% 

Why dun this work?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 06-10-2005 , 13:20   Re: Why dun this work?
Reply With Quote #3

As far as I know, the ID being passed to your "show_message" function will be the same as the Task ID, which you put as: TASK_ID+id, but then you try to use that ID in the show_message function as if it were a player ID.. I think you should minus TASK_ID from the player ID first..

Code:
#include <amxmodx> public plugin_init()     register_plugin("HUD Score","0.1","v3x") #define TASK_ID 2934 public client_connect(id) set_task(1.0,"show_message",TASK_ID+id) public client_disconnect(id) remove_task(TASK_ID+id) public show_message(id) {     new playerID = id - TASK_ID     new frags = get_user_frags(playerID)     new deaths = get_user_deaths(playerID)     new msgstr[64]     format(msgstr,63,"Kills: %i / Deaths: %i",frags,deaths)     set_hudmessage(255,255,255,-1.0,0.35,2,0.1,1.0,0.02,0.02,10)     show_hudmessage(playerID,msgstr)     return PLUGIN_HANDLED }

I hope that helps, or even works!
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:47.


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