Thread: Help me please
View Single Post
  #8  
Old 09-09-2012, 05:06 AM
Starfire2001 Starfire2001 is offline
Unholy Nation
Starfire2001's Avatar
Join Date: Dec 2010
Location: The streets.
Posts: 156
Starfire2001 will become famous soon enough
Quote:
Originally Posted by iCoke View Post
Im not, I am putting it on as a "Weapon" on a server.
onPlayerChats doesn't work serverside in weapons, so you have to make the script you have clientside. However you can't add weapons to the player clientside, so you are going to have to use triggerserver to add the weapon. If you don't know anything about triggering try this thread.

http://forums.graal2001.com/forums/s...ad.php?t=84321

Using callimuc's script, you'll end up with something like...

PHP Code:
function onActionserverside(){
  
//add the weapon
}

//#CLIENTSIDE
function onPlayerchats(){
  if (
player.chat == "/open"){
    if (!(
"-Bank/Account" in player.weapons)){
      
say2("You already have a bank account");
    }
    else{
      
say2("You have opened a bank account!");
      
//triggerserver goes here
    
}
  } 

__________________
-Ph8
Reply With Quote