Ok, I'm new to this scripting thing, and I wanted to do a simple mod that could change your clan tags when you typed /changetags [blid] [tags1] [tags2].
This is what I did.
function serverCmdchangetags(%admin, %blid, %clanprefix, %clansuffix)
{
if(!%admin.issuperadmin) return;
%target = getclientbyid(%blid);
if(target == -1) return;
$ClanTagsSet[%blid] = true;
messageall("\c1 " @ %target.name @ " 's clan tags have been changed to " @ %target.clanprefix @ " and " @ %target.clansuffix @ ".");
}
function serverCmdremovetags(%blid)
{
$ClanTagsSet[%blid] = true;
%target = getclientbyid(%blid);
if(target == -1) return;
messageclient(%target, "", "\c1Your clan tags were removed.");
}
function getClientByID(%idnum)
{
for(%i = 0; %i < clientgroup.getcount(); %i++)
{
%plyrcheck = clientgroup.getobject(%i);
if(%plyrcheck.bl_id == %idnum) return %plyrcheck;
}
return -1;
}
When I get in-game, I type in /changetags [blid] [tags1] [tags2] and a message should appear saying my clan tags have been changed and they should be changed. But nothing happens, so what's wrong?