Raised This Month: $ Target: $400
 0% 

Target


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DarlD
Senior Member
Join Date: Aug 2004
Old 12-19-2005 , 01:52   Target
Reply With Quote #1

How would one target someone threw chat commands.

Code:
public checktext(id) {     if (!access(id,ADMIN_KICK)         return PLUGIN_HANDLED     new text[2]     read_argv(1, text, 1)         while (text[0] != '!')         return PLUGIN_HANDLED         new name[63],Target[32]
i wanted to use authid but that would return the player activating this script.
__________________
DarlD is offline
Send a message via MSN to DarlD
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 12-19-2005 , 03:42  
Reply With Quote #2

I'm confused.. You mean the person who ran that command threw say chat?
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
DarlD
Senior Member
Join Date: Aug 2004
Old 12-19-2005 , 23:30  
Reply With Quote #3

yes like so: say:! Meta
and meta would be the player that is targeted
dont know if you see what i mean....
__________________
DarlD is offline
Send a message via MSN to DarlD
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 12-19-2005 , 23:35  
Reply With Quote #4

Code:
 public checktext(id) { // <--id is the person id.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 12-20-2005 , 02:08  
Reply With Quote #5

Assuming it is like this:
say ! player command

Code:
 public checktext(id) {     if (!access(id,ADMIN_KICK)         return PLUGIN_HANDLED     // get what they said     new text[64]     read_args(text, 63)     // ignore if it doesn't start with !     if (text[0] != '!')         return PLUGIN_HANDLED     // clear the !     replace(text, 63, "!", "")     // trim it of extra spaces     trim(text)     // get name and data     new name[32], command[32]     strbreak(text, name, 31, command, 31)     // tada     new player = cmd_target(id, name);  }

Assuming it is just:
say ! player

Code:
 public checktext(id) {     if (!access(id,ADMIN_KICK)         return PLUGIN_HANDLED     // get what they said     new text[64]     read_args(text, 63)     // ignore if it doesn't start with !     if (text[0] != '!')         return PLUGIN_HANDLED     // clear the !     replace(text, 63, "!", "")     // trim it of extra spaces     trim(text)     // tada     new player = cmd_target(id, text);  }
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX 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 16:02.


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