Raised This Month: $ Target: $400
 0% 

Why won't this work?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Drak
Veteran Member
Join Date: Jul 2005
Old 06-19-2006 , 14:54   Why won't this work?
Reply With Quote #1

Code:
client_print(id,print_chat,"You're name is %i",get_user_name(id))
When the function is activated, the server just crashes.
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
TheNewt
Donor
Join Date: Jun 2006
Location: Where I live.
Old 06-19-2006 , 15:10  
Reply With Quote #2

lol
Code:
new name[18] get_user_name(id, name, 17) client_print(id, print_chat, "Your name is: %s", name)
i think thats correct syntax....
TheNewt is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 06-19-2006 , 15:21  
Reply With Quote #3

Now how would I do it if I wanted to put the users name that's activating the function, into a amx command. Such as.
Code:
new name[18] get_user_name(id, name, 17) server_cmd("amx_setjob %s 1",name)
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 06-19-2006 , 15:52  
Reply With Quote #4

Quote:
Originally Posted by SixTwin
Now how would I do it if I wanted to put the users name that's activating the function, into a amx command. Such as.
Code:
new name[18] get_user_name(id, name, 17) server_cmd("amx_setjob %s 1",name)
That should work, name should be 33 cells and the max len should be 32 though in order to make sure that it's not over the limit.

There are some people who's names are like:
D3agl3-Cross- `I'm not an addict
(He's my friend)
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Drak
Veteran Member
Join Date: Jul 2005
Old 06-19-2006 , 19:33  
Reply With Quote #5

Hmmm, still no work.
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 06-19-2006 , 20:06  
Reply With Quote #6

Code:
server_cmd("amx_setjob ^"%s^" 1",name)
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Drak
Veteran Member
Join Date: Jul 2005
Old 06-19-2006 , 20:18  
Reply With Quote #7

Arg, it's still coming up as "can't find user"
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 06-19-2006 , 20:25  
Reply With Quote #8

Quote:
Originally Posted by SixTwin
Arg, it's still coming up as "can't find user"
Are you sure that's the correct order?
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Drak
Veteran Member
Join Date: Jul 2005
Old 06-19-2006 , 20:36  
Reply With Quote #9

Yup, i'm positive.
Code:
register_concmd("amx_setjob","admin_economy",ADMIN_ALL,"<name or #userid> <job> - Set a job for a player")
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
Reply


Thread Tools
Display Modes

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 07:56.


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