AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hard coding Id into the script (https://forums.alliedmods.net/showthread.php?t=3041)

Foamy 06-24-2004 17:56

Hard coding Id into the script
 
I need to know how to code someones id into the script. So the command does diffrent things each id i put in.

Ryan 06-24-2004 18:28

you need to be more specific. not all functions and/or events automatically pass a player id with them.

do you have a bit of sample code you can throw in there so we can help you?

Foamy 06-24-2004 20:27

Code:

public plugin_init(){
register_plugin("Dev Commands","0.9a","Server Dev Team")
register_concmd("submitmsg","cmdSay",ADMIN_RCON,"<message> - Devoloper command.")
}

public cmdSay(id,level,cid){
new message[192], name[32],authid[32]
read_args(message,191)
remove_quotes(message)
get_user_authid(id,authid,31)
get_user_name(id,name,31)
client_print(0,print_notify,"(Server Developer) %s :  %s",name,message)
server_cmd("echo (Announce) %s :  %s",name,message)
return PLUGIN_HANDLED
}

I'd want it so if i do the command "submitmsg Hello" it would say "(Server Developer) <Foamy> is playing with name <Homeless> : Hello"
But if another one of my admins did it my name would be replaced with his.


All times are GMT -4. The time now is 14:47.

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