Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   Triggers (https://forums.graalonline.com/forums/showthread.php?t=64077)

talkingnoodle 02-13-2006 12:54 AM

Triggers
 
I'm triggering the server to get info on another player and this is what is in the server options.

PHP Code:

function onActionServerside(){
if (
params[0] == "getinfo"){
for (
a: allplayers){
with (a){
if (
a == params[1]){
setstring("this.kills", clientr.b031504k);
setstring("this.deaths", clientr.b031504d);
setstring("this.money", clientr.money572R7S);
setstring("this.hp", client.hp);
setstring("this.maxhp", clientr.mhp);
setstring("this.guild", clientr.tagon);
setstring("this.ec", client.etcoins);
}
}
}
}
triggerAction(0,0, "clientside", "Tools/Police Tool", "gotinfo", this.kills, this.deaths, this.money, this.hp, this.maxhp, this.guild, this.ec);
} 

And here is how the clientside part reads it

PHP Code:

function onActionClientside(){
if (
params[0] == "gotinfo"){
info1 = params[1];
info2 = params[2];
info3 = params[3];
info4 = params[4];
info5 = params[5];
info6 = params[6];
info7 = params[7];
}
} 


When i read the info(1-6) parts it shows MY stats and not the other players :/ help plz

napo_p2p 02-13-2006 01:33 AM

I would take a look at this.

Also, you don't have to go through every player to get one.

talkingnoodle 02-13-2006 01:46 AM

I understand why you sent me that site, is it becuase of the setstring()? If it is I already know I can just use this.blah = watever, but for some reason I just changed setstring.


All times are GMT +2. The time now is 11:17 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.