Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-21-2009, 10:07 PM
Struggler Struggler is offline
Zone Repulser =D
Struggler's Avatar
Join Date: May 2006
Posts: 54
Struggler is an unknown quantity at this point
Post Help with my script?

Hey, yeah, I'm trying to make a clan system, but cant get the adding down. You see, what it is susposed to do is add the tag weapon, add the clan string, and tell them they've been added. It does all but adding the string, can someone tell me how to add the string to a targeted player?

function onActionServerside(){
if(params[0] == "add"){
this.clan = clientr.clan;
temp.pl = findplayerbycommunityname(params[1]);
if (pl != NULL){
pl.addstring(clientr.clan,this.clan);
pl.addweapon("Public/Struggler/ClanTag");
pl.chat = "You have been added to clan: "@this.clan;
} else{
player.chat = "Cannot find player!";
}
}
}
//#CLIENTSIDE
function onPlayerChats(){
if (player.chat.starts("/addmember")){
triggerserver("gui",this.name,"add",player.chat.su bstring(11));
}
}
Reply With Quote
  #2  
Old 05-21-2009, 10:10 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Well first off put your script in PHP tags for the sake of readability.

Instead of using addstring you can just do the following:

pl.clientr.clan.add(this.clan);

There's also (Using your example variables):

pl.clientr.clan.delete(index);
pl.clientr.clan.remove("string");
pl.clientr.clan.insert(index, "string");
__________________
Quote:
Reply With Quote
  #3  
Old 05-21-2009, 10:13 PM
Struggler Struggler is offline
Zone Repulser =D
Struggler's Avatar
Join Date: May 2006
Posts: 54
Struggler is an unknown quantity at this point
srry, didnt no to php it. Thx fowl.
Reply With Quote
Reply


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 03:28 AM.


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