View Single Post
  #1  
Old 02-12-2011, 12:06 AM
Trakan Trakan is offline
It's all about cats!
Trakan's Avatar
Join Date: Sep 2010
Location: France
Posts: 64
Trakan is an unknown quantity at this point
Change player var with player chat

Ok i make a Humor script (viewable at profile rights click).

Here is my script :
PHP Code:
// Scripted by *Trakan (Admin)
//#CLIENTSIDE
function onWeaponFired() {
say2("For change humor say #b /humor <your humor>");
}

function 
onPlayerChats(){ 
if(
player.chat.starts("/humor")){
[
U]triggerserver("gui", name, "tagOn", clientr.humor);[/U]
player.chat = "Humor changed !";
 } 
} 
My problem is :
i need to set se variable clientr.humor with the player.chat

exemple :
the player say /humor test
The variable changed to test.

Thanks for future help.
Reply With Quote