AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Why won't this work? (https://forums.alliedmods.net/showthread.php?t=29960)

Drak 06-19-2006 14:54

Why won't this work?
 
Code:
client_print(id,print_chat,"You're name is %i",get_user_name(id))
When the function is activated, the server just crashes.

TheNewt 06-19-2006 15:10

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....

Drak 06-19-2006 15:21

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)

Hawk552 06-19-2006 15:52

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)

Drak 06-19-2006 19:33

Hmmm, still no work. :?

Hawk552 06-19-2006 20:06

Code:
server_cmd("amx_setjob ^"%s^" 1",name)

Drak 06-19-2006 20:18

Arg, it's still coming up as "can't find user"

Hawk552 06-19-2006 20:25

Quote:

Originally Posted by SixTwin
Arg, it's still coming up as "can't find user"

Are you sure that's the correct order?

Drak 06-19-2006 20:36

Yup, i'm positive.
Code:
register_concmd("amx_setjob","admin_economy",ADMIN_ALL,"<name or #userid> <job> - Set a job for a player")


All times are GMT -4. The time now is 07:56.

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