Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 07-21-2012, 02:40 AM
BlueMelon BlueMelon is offline
asdfg
BlueMelon's Avatar
Join Date: Sep 2008
Posts: 1,481
BlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to behold
PHP Code:

function onActionServerSide(cmd,player_name,report_reason){
  if(
cmd == "report"){
    echo(
"REPORT: Player name: "@player_name@" Reason: "@report_reason@" from: "@player.account);
  }
}


//#CLIENTSIDE

// ... GUI Code

function Report_Button1.onAction(){
  
temp.player_name Report_Text1.text;
  
temp.reason Report_Text2.text;
  
triggerserver("gui",this.name,"report",temp.player_name,temp.reason);

Here is a quick example on how to trigger serverside to echo.
I suggest you follow proper naming conventions when naming your GUI controls.
http://forums.graalonline.com/forums...ad.php?t=85600
__________________
http://i.imgur.com/OOJbW.jpg
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:14 AM.


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