Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-26-2011, 02:21 PM
Schetti Schetti is offline
SC2 Player
Schetti's Avatar
Join Date: Nov 2008
Location: Austria
Posts: 269
Schetti is on a distinguished road
Switch needed for triggerserver?

Do I need a switch command for triggerserver?
I tried to check the command via if-funktion, but that didn't work, can someone tell me why?
PHP Code:
function onActionserverside() 
{
   if (
params[0] == "summon")   //If instead of a switch
   
{
      
temp.pl findplayerbycommunityname(params[1]);
      if (
pl != NULL
      {
       
pl.setlevel2(player.levelplayer.xplayer.y);
       
pl.chat format(""player.account);
       
player.chat format(""pl.communityname);
      }else
    
player.chat format("Community name '%s' not found!"params[1]);
   }
}
//#CLIENTSIDE
function onPlayerChats() 
{
   if (
player.chat.starts("/summon") && player.account != NULL
   {
    
triggerserver("gui"this.name"summon"player.chat.substring(8));
   }

__________________
“Peace cannot be kept by force. It can only be achieved by understanding.” – Albert Einstein
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 11:37 AM.


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