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

Give Command not working


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xakintosh
I run no-steam servers!
Join Date: Feb 2010
Location: Edge of nowhere
Old 12-15-2010 , 05:00   Give Command not working
Reply With Quote #1

I have the code bellow and when player name is "test test" not working..
how can be fixed or how to detect when player name have "space" between and change it with some string "\,"
Code:
public give_hook(id,level,cid) {     if (!cmd_access(id,level,cid,3) )         return PLUGIN_HANDLED         new szarg1[32], szarg2[8], bool:mode     read_argv(1,szarg1,32)     read_argv(2,szarg2,32)     if(equal(szarg2,"on"))         mode = true         new pid = cmd_target(id,szarg1,2)     if(pid > 0) {         canusehook[pid] = mode         if(mode) {             ColorChat(pid, RED, "[kz#] ^1You have ^4Hook^1, bind any key '+hook' to use it")         }     }     return PLUGIN_HANDLED }
__________________
As soon as possible.
xakintosh is offline
Send a message via Yahoo to xakintosh Send a message via Skype™ to xakintosh
xakintosh
I run no-steam servers!
Join Date: Feb 2010
Location: Edge of nowhere
Old 12-15-2010 , 05:23   Re: Give Command not working
Reply With Quote #2

Sorry find what i need http://forums.alliedmods.net/showthread.php?t=88500

Code:
public client_infochanged(id) {     new szName[32]     get_user_info(id, "name", szName, charsmax(szName))     replace_all(szName, charsmax(szName), " ", "_")     set_user_info(id, "name", szName) }
__________________
As soon as possible.

Last edited by xakintosh; 12-15-2010 at 05:29. Reason: nice one ^^ mAr7obg fck me :D
xakintosh is offline
Send a message via Yahoo to xakintosh Send a message via Skype™ to xakintosh
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 12-15-2010 , 05:55   Re: Give Command not working
Reply With Quote #3

You could just use quotes around the player's name.

Code:
give_hook "test test" "on"
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
xakintosh
I run no-steam servers!
Join Date: Feb 2010
Location: Edge of nowhere
Old 12-15-2010 , 06:11   Re: Give Command not working
Reply With Quote #4

Hey thanks i got forgot them
__________________
As soon as possible.
xakintosh is offline
Send a message via Yahoo to xakintosh Send a message via Skype™ to xakintosh
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:30.


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