Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   clientr set help (https://forums.graalonline.com/forums/showthread.php?t=134259232)

sssssssssss 05-18-2010 09:18 PM

clientr set help
 
So, I haven't scripted in a bit, but for some reason, this seems right, and its not working. GUIDE ME PLZZORS.

PHP Code:

function onActionPlayerOnline() 
{
   
triggerClient("gui"this.name"setguild"player.guild);
}
//#CLIENTSIDE
function onActionClientSide() {
  
clientr.guild params[0];



fowlplay4 05-18-2010 09:20 PM

I believe that only gets sent to the Control-NPC, you'll have to use onPlayerLogin instead.

That's also pretty backwards, since you are supposed to set clientr flags on the server-side.

PHP Code:

function onPlayerLogin(plyr) {
  
with (plyr) {  
    
clientr.guild player.guild;
  }


Should suffice.

sssssssssss 05-18-2010 09:22 PM

Oh, yeah, xD

Thanks for the reminder. Works.

fowlplay4 05-18-2010 09:25 PM

Updated my post with the working version.

My test script:

PHP Code:

function onPlayerLogin(plyr) {
  
with (plyr) {
    echo(
player.account);
  }



xAndrewx 05-18-2010 09:32 PM

*pst*

In your origional script:

You can't modify 'clientr.' flags clientside, and you were setting it to 'setguild' :)
(params[0] = "setguild", params[1] = player.guild)
*/pst*

DustyPorViva 05-18-2010 09:48 PM

Indeed... but what would you want to trigger the client to set a clientr? They're meant to be used on the serverside, not the clientside.

PHP Code:

function onActionPlayerOnline(pl) {
   
pl.clientr.guild pl.guild;




All times are GMT +2. The time now is 11:45 AM.

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