Out of curiousity, why won’t this work? I mean it works, it adds the guild, but it ignores the money and client.guild flag. Any ideas, or tips to fix this?
if (playerchats&&strcontains(#c,/createguild)) {
if (!client.guild&&playerrupees>=5000) {
tokenize #c;
setstring client.guild,#t(1);
say 1;
triggeraction 0,0,gr.addguildmember,#t(1),#a;
}else setplayerprop #c,You either don't have enough money, or you already made a guild!;
}
Have you tried just doing if (strtofloat(#s(client.guild))==0) or (strequals(#s(client.guild),)) instead of !client.guild?
Also perhaps you should add something to it adds the guild name to a server array and check it prior to guild creation so people can’t break into each others guilds.
I’m no good with that kind of stuff, you know that. I’m a leveler more than a scripter. How would I go about that? Could you possibly start it for me, and I’ll see if i can finish it…
if (playerchats && startswith(/createguild,#c)){
tokenize #c;
if (strtofloat(#s(client.guild))==0 && playerrupees>=5000 && !strcontains(#s(server.created_guilds),#t(1))) {
addstring server.created_guilds,#t(1);
playerrupees-=5000;
setstring client.guild,#t(1);
say 1;
triggeraction 0,0,gr.addguildmember,#t(1),#a;
}
else setplayerprop #c,You either don't have enough money, or you already made a guild!;
}
if (playerchats && startswith(/createguild,#c)){
tokenize #c;
if (strtofloat(#s(client.guild))==0 && playerrupees>=5000 && !strcontains(#s(server.created_guilds),#t(1))) {
addstring server.created_guilds,#t(1);
playerrupees-=5000;
setstring client.guild,#t(1);
say 1;
triggeraction 0,0,gr.addguildmember,#t(1),#a;
}
else setplayerprop #c,You either don't have enough money, or you already made a guild!;
}