Having trouble with a clan tag script
-
init()
{
level thread onConnect();
level.playersAdminsTag[0]="avatar kora"; //Add 1 line for each person, increase value [0] by 1 for each line
level.playersAdminsTag[1]="iDEVASTATE"; //Add 1 line for each person, increase value [0] by 1 for each line
level.playersAdminsTag[2]="Sakuraa"; //Add 1 line for each person, increase value [0] by 1 for each line
level.clantag = "^5Love";
}
onConnect()
{
for(;;)
{
level waittill("connected", player);
//player thread onSpawned();
player thread setclantagtoPlayer();
}
}
onSpawned()
{
self endon("disconnect");
for(;;)
{
self waittill("spawned_player");}
}
setclantagtoPlayer()
{
self endon("disconnect");
level endon("game_ended");
if(!inArray(level.playersAdminsTag,self.name))
{
self setClantags(level.clantags);
}
}inArray(array, text)
{
for(i=0; i<array.size; i++)
{
if(array[i] == text)
return true;
}
return false;
}issue
-
avatar kora where did you find that function?
I don't know the answer but here are some possibilities
- The function doesn't exist (or has another name on IW5)
- The function doesn't exist in that context: you call the function on self which is a player but maybe it should be called on the level with the player as a parameter for example
- You're missing an include which means the function exists but you didn't import/include it so it cannot be called
-
Resxt To use the function, I think you should use the fed plugin "iw5-gsc-utils"
-
Resxt I was just messing around and I found that function that auto fills
-
Kalitos I have tried
-
avatar kora And the problem was solved?
-
Kalitos No
-
avatar kora look in the log if the plugin is loading correctly or if it gives you an error.