Raised This Month: $ Target: $400
 0% 

ServerCommand - Quotes Issue


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
noodleboy347
AlliedModders Donor
Join Date: Mar 2009
Old 10-24-2009 , 14:45   ServerCommand - Quotes Issue
Reply With Quote #1

There's a really stupid thing I have to deal with that's currently impossible to get around for me. I'm trying to use ServerCommand with sm_fakeachievement, but I can't make the argument more than one word.

PHP Code:
ServerCommand("sm_fakeachievement #%i Test One"client
That shows up as Test. Putting Test One in quotes makes the whole thing not work, and putting them in single quotes '' displays '. I've tried making the achievement name a string, but that doesn't work either. What should I do?
noodleboy347 is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 10-24-2009 , 15:01   Re: ServerCommand - Quotes Issue
Reply With Quote #2

Perhaps:
ServerCommand("sm_fakeachievement #%i %s", client, StringThatHasTestOne)
thetwistedpanda is offline
noodleboy347
AlliedModders Donor
Join Date: Mar 2009
Old 10-24-2009 , 16:36   Re: ServerCommand - Quotes Issue
Reply With Quote #3

Quote:
Originally Posted by thetwistedpanda View Post
Perhaps:
ServerCommand("sm_fakeachievement #%i %s", client, StringThatHasTestOne)
Tried that, just displays the first word.
noodleboy347 is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 10-24-2009 , 16:49   Re: ServerCommand - Quotes Issue
Reply With Quote #4

Err if it was a string it really shouldn't have only shown the first word o.O
thetwistedpanda is offline
noodleboy347
AlliedModders Donor
Join Date: Mar 2009
Old 10-24-2009 , 16:55   Re: ServerCommand - Quotes Issue
Reply With Quote #5

Quote:
Originally Posted by thetwistedpanda View Post
Err if it was a string it really shouldn't have only shown the first word o.O
The plugin works like

sm_fakeachievement NAME "Achievement Name"

I think the achievement name has to be surrounded in quotes somehow.
noodleboy347 is offline
TESLA-X4
Senior Member
Join Date: Dec 2008
Location: $Recycle.Bin
Old 10-24-2009 , 16:57   Re: ServerCommand - Quotes Issue
Reply With Quote #6

PHP Code:
ServerCommand("sm_fakeachievement #%i \"Test One\""GetClientUserId(client)); 
TESLA-X4 is offline
noodleboy347
AlliedModders Donor
Join Date: Mar 2009
Old 10-24-2009 , 17:06   Re: ServerCommand - Quotes Issue
Reply With Quote #7

Quote:
Originally Posted by TESLA-X4 View Post
PHP Code:
ServerCommand("sm_fakeachievement #%i \"Test One\""GetClientUserId(client)); 
Ah, thank you!
noodleboy347 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 00:07.


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