Raised This Month: $51 Target: $400
 12% 

setinfo help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
connoisseur
Senior Member
Join Date: Jan 2012
Old 07-09-2013 , 13:12   setinfo help
Reply With Quote #1

Following are a few lines from my code:
PHP Code:
new var[32]
format (var, 31"blabla")
set_user_info (id"var" , var) 
The program compiles with no error.
But the setinfo does not work while running the plugin.
I have to manually put "setinfo var blabla" in console.

Does the set_user_info not take variables in its arguments?
The variable var does not remain the same in the code, so I cannot use
PHP Code:
set_user_info (id"var" "blabla"
Any suggestions?

Last edited by connoisseur; 07-09-2013 at 13:12.
connoisseur is offline
ChileScripting
BANNED
Join Date: Jan 2013
Old 07-09-2013 , 20:23   Re: setinfo help
Reply With Quote #2

Test:

Code:
    new var[32]     formatex(var, charsmax(var), "blabla")     set_user_info(id, "var %s" , var)
ChileScripting is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-09-2013 , 21:14   Re: setinfo help
Reply With Quote #3

You are using the function correctly. set_user_info() sets a user's info on the server. What variable are you trying to set and what are you expecting to happen?


Quote:
Originally Posted by ChileScripting View Post
Test:

Code:
    new var[32]     formatex(var, charsmax(var), "blabla")     set_user_info(id, "var %s" , var)
No.
__________________
fysiks is offline
connoisseur
Senior Member
Join Date: Jan 2012
Old 07-10-2013 , 03:40   Re: setinfo help
Reply With Quote #4

Quote:
Originally Posted by fysiks View Post
What variable are you trying to set and what are you expecting to happen?
Code:
setinfo var <information>
I'm trying to put the value of var[32] in <information>
But it is not working, I have to manually put "setinfo var <information>" in the client console, while testing.
connoisseur is offline
Shooting King
RAAASENGAN
Join Date: Mar 2012
Location: India
Old 07-10-2013 , 04:20   Re: setinfo help
Reply With Quote #5

Use this.

PHP Code:
client_cmdid "setinfo var %s", var ) 
__________________
As every time said, don't ever UNDERESTIMATE me.

Donate - Here

Last edited by Shooting King; 07-10-2013 at 04:23.
Shooting King is offline
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 07-10-2013 , 05:24   Re: setinfo help
Reply With Quote #6

Quote:
Originally Posted by Shooting King View Post
Use this.

PHP Code:
client_cmdid "setinfo var %s", var ) 
No!
EpicMonkey is offline
connoisseur
Senior Member
Join Date: Jan 2012
Old 07-10-2013 , 06:12   Re: setinfo help
Reply With Quote #7

Quote:
Originally Posted by Shooting King View Post
Use this.
PHP Code:
client_cmdid "setinfo var %s", var ) 
Are you sure this will work in accordance with the new steam update restrictions?
connoisseur is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 07-10-2013 , 06:17   Re: setinfo help
Reply With Quote #8

PHP Code:
static key[8], value[16]
formatkeycharsmax(key), "_key" )
formatvaluecharsmax(value), "mycostomvalue" )
set_user_info idkeyvalue 
PHP Code:
or
set_user_info id"_key""mycostomvalue" 
.Dare Devil. is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-10-2013 , 14:59   Re: setinfo help
Reply With Quote #9

Quote:
Originally Posted by connoisseur View Post
Code:
setinfo var <information>
I'm trying to put the value of var[32] in <information>
But it is not working, I have to manually put "setinfo var <information>" in the client console, while testing.
You need to explain what you are trying to do. Just saying "I'm trying to put info in a variable" is not helpful.
__________________
fysiks is offline
Shooting King
RAAASENGAN
Join Date: Mar 2012
Location: India
Old 07-11-2013 , 01:05   Re: setinfo help
Reply With Quote #10

Quote:
Originally Posted by connoisseur View Post
Are you sure this will work in accordance with the new steam update restrictions?
Try it .
__________________
As every time said, don't ever UNDERESTIMATE me.

Donate - Here
Shooting King 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 23:32.


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