Raised This Month: $ Target: $400
 0% 

Hard coding Id into the script


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Foamy
Junior Member
Join Date: Jun 2004
Location: In a box
Old 06-24-2004 , 17:56   Hard coding Id into the script
Reply With Quote #1

I need to know how to code someones id into the script. So the command does diffrent things each id i put in.
__________________
Living in a box?

Ha ha
Foamy is offline
Ryan
Senior Member
Join Date: May 2004
Location: NH, USA
Old 06-24-2004 , 18:28  
Reply With Quote #2

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?
__________________
Warcraft 3: Expansion
Homepage | Downloads | Forums
Ryan is offline
Send a message via AIM to Ryan
Foamy
Junior Member
Join Date: Jun 2004
Location: In a box
Old 06-24-2004 , 20:27  
Reply With Quote #3

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.
__________________
Living in a box?

Ha ha
Foamy is offline
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 14:47.


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