![]() |
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)); } } |
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"); |
srry, didnt no to php it. Thx fowl.
|
| All times are GMT +2. The time now is 06:12 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.