AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Remembering names (https://forums.alliedmods.net/showthread.php?t=10068)

v3x 02-07-2005 15:24

Remembering names
 
Hey, you know when you llama someone it changes their name to Llama, and when you `unllama` them it changes back to their original name? How do you do that? :?

XxAvalanchexX 02-07-2005 17:12

Use get_user_info to get a user's current name, save it to a variable, use client_cmd to force them to change their name, and when you want to change it back set it to what you saved.

Twilight Suzuka 02-07-2005 17:32

you know there IS a command called get_user_name?

XxAvalanchexX 02-07-2005 17:45

Oh, yeah, that...

v3x 02-07-2005 21:15

Quote:

Originally Posted by XxAvalanchexX
Use get_user_info to get a user's current name, save it to a variable, use client_cmd to force them to change their name, and when you want to change it back set it to what you saved.

Example? :oops:

XxAvalanchexX 02-07-2005 21:50

Code:
new names[33][33]; public dothing(id) {   // la-di-da-dee-dah, player is now magically our target   get_user_name(player,names[player],32);   client_cmd(player,"name ^"The name here!^""); } public undothing(id) {   // once again, assuming player is our target   client_cmd(player,"name ^"%s^"",names[player]); }

v3x 02-07-2005 22:23

Oh, simple lol. Thanks :).

As you can tell I'm new to AMXX scripting, but I do code server side stuff also :).

Edit: What if I wanted to do it with something else (a team)? ..

XxAvalanchexX 02-08-2005 00:46

Use get_players and loop through everyone.

DarkShadowST 02-08-2005 00:48

Quote:

Edit: What if I wanted to do it with something else (a team)? ..
it??

v3x 02-08-2005 01:07

Quote:

Originally Posted by XxAvalanchexX
Use get_players and loop through everyone.

:? lol


All times are GMT -4. The time now is 19:20.

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