Quote:
Originally Posted by iCoke
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
}
}
}