Thread: chat.substring?
View Single Post
  #2  
Old 11-16-2007, 03:23 AM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
It uses everything in the player's chat or w.e after the number in ().
Example:
PHP Code:
function onActionServerSide() {
 if (
params[0] == ":ap") {
  
with(findplayer
 
}
}
//#CLIENTSIDE
function onPlayerChats() {
 if (
player.chat.starts(":ap") {
  
triggerserver("gui",this.name,":ap",player.account,player.chat.substring(6).trim);
 }

Would set the player using the weapon's AP as the player's chat at/after the 6th letter of the players chat, and if there's a space there, going to the letter after it.
Atleast, I think so.
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote