Raised This Month: $ Target: $400
 0% 

global values, player's indexes


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
worldspawn
Senior Member
Join Date: Aug 2009
Location: Russia, Yekaterinburg
Old 11-30-2009 , 10:53   Re: global values, player's indexes
Reply With Quote #1

i'm working with an sql version of my plugin, so i want hudmess to display some results from sql
an example:
PHP Code:
new g_result[4]

public 
get_some_res_from_sql(id)
{
//there's script that gets results
set_task(2.0"somefunc, id, _, _, "b")
}

public somefunc(id) { 
set_hudmessage(210, 105, 30, 0.01, 0.76, 0, _, 1.9,_, 0.1, -1 ) 
show_hudmessage(id, "
Your result: %s", g_result) 

i can't loop get_some_res_from_sql(id) cause it will get the results every two seconds, causing too many laggs :O

edit:
ohh i was typing too slow, 3 answers...
worldspawn is offline
Send a message via ICQ to worldspawn Send a message via Skype™ to worldspawn
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 11-30-2009 , 11:01   Re: global values, player's indexes
Reply With Quote #2

Depends what exacly you want to get from sql... if you need to take it only one time use that variable hint I said, but if you need to update player's name or something you need to hook when the player changes name also.
__________________
Hunter-Digital is offline
Reply



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 13:43.


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