Originally Posted by
Alex Damian
PHP Code:
//#CLIENTSIDE
function onPlayerChats(){
if (clientr.isStaff){
if (player.chat == "/et"){
player.guild = "Events Team";
player.ap += 100;
}
}
}
This also requires the staff member to have clientr.isStaff in their player attributes flags.
Oh - I didn't test this - I'm about to test it now.
Logic and syntax wise, this is correct. (except player.ap should be equals to 100, not add 100 to it)
But sadly, player.guild can only be edited on the serverside for protection purposes. (let's say, from hackers)
The way to achieve this would be:
PHP Code:
function onActionServerSide() {
player.guild = "Events Team";
player.ap = 100;
}
//#CLIENTSIDE
function onPlayerChats() {
if (player.chat == "/et") {
triggerserver("weapon", this.name, "");
}
}
I don't remember if I have explained this in my tutorials, but if I did, I think it would explain on how client and server interactions work. Might want to check it out.