PDA

View Full Version : [Advanced] Clan System


Gummy Bear
26/04/2010, 11:51 PM
Hey guys, I'm actually looking to script something advanced, but i really don't know where to start, so i need some help!
I would like to make a CLAN system, we're you can make you'r own clan by using:
-------------------
/clancreate [name]
-----------------
/claninvite [playerid]
OR
/clanjoin [clan name]
-----------------
And
/(c)lanchat [text]
-----------------
For the moment, I'm only looking to get a little start for that, and I'll surely update it later on when i'll be more advanced!

Thanks in advance!
Gummy Bear!

Steven82
26/04/2010, 11:52 PM
Um...let me ask you, how long have you been scripting pawno? And do you know dini,dudb? and all the others?

if not then good luck trying to make them save...

Gummy Bear
26/04/2010, 11:53 PM
I'm trying for around two weeks now, and yes I'm a beginner, but i usually always start by the hard things,
I definatly just need a start, and then I'll work hard on making it work, even if it will take me two weeks.

luigifan9
27/04/2010, 12:10 AM
I'm trying for around two weeks now, and yes I'm a beginner, but i usually always start by the hard things,
I definatly just need a start, and then I'll work hard on making it work, even if it will take me two weeks.


PSHHHHHHHHHHHHHHHHHHHHHHHHHHHHH TWO WEEKS BAHAHAHAHHAAHAHAHHA -.-. If your a beginner itll take A LOT more then two weeks i'll tell you that....

Gummy Bear
27/04/2010, 12:12 AM
Its fun to see how encouraging guys with 48 posts that sucks in .pawno by making some stupid ''Colors Filterscripts'' laugh at the ones that trys to begin by making HARDER things than them..

luigifan9
27/04/2010, 12:19 AM
Its fun to see how encouraging guys with 48 posts that sucks in .pawno by making some stupid ''Colors Filterscripts'' laugh at the ones that trys to begin by making HARDER things than them..


I never said i was BETTER than you. I was simply stating that i your starting out it will take more than two weeks. I was laughing at how you underestimated the time drastically.

BTW: You have 18 posts so don't be talking...

Gummy Bear
27/04/2010, 12:20 AM
Splendid..
'Nayways, anyone could help me to start?
thanks in advance ^_^

Steven82
27/04/2010, 12:21 AM
Its fun to see how encouraging guys with 48 posts that sucks in .pawno by making some stupid ''Colors Filterscripts'' laugh at the ones that trys to begin by making HARDER things than them..


I never said i was BETTER than you. I was simply stating that i your starting out it will take more than two weeks. I was laughing at how you underestimated the time drastically.

BTW: You have 18 posts so don't be talking...



You can shut up to, all you make are simple FS, ok and hey i am sorry if i started this fighting bull shit but you need to learn dini and dudb to save your clans if they were made i can't help you from there i can only guide you :/

cessil
27/04/2010, 12:22 AM
Here's an old one I made, only because luigifan9 was a jerk, I was only scripting for a month or so when I made this.

top of the script
new playerclan[MAX_PLAYERS];
new clannames[10][30];
new claninvite[MAX_PLAYERS];
new clanask[MAX_PLAYERS];
new clanjoin[MAX_PLAYERS];


in commands
if(strcmp(cmd, "/cc", true) == 0 || strcmp(cmd, "/clancreate", true) == 0) // clan create
{
if(playerclan[playerid] != 99) return SendClientMessage(playerid,ORANGE,"you are already in a clan leave before creating a new one");
new reason[10];
new cid = 99;
format(reason,sizeof(reason),"%s",bigstrtok(cmdtext, idx));
if(!strlen(reason))
{
SendClientMessage(playerid, ORANGE, "USAGE: /cc [clan name]");
SendClientMessage(playerid, ORANGE, "FUNCTION: Will create a clan");
return 1;
}
for(new i = 9; i > -1; i--)
{
if (strcmp(clannames[i]," ",true) == 0 || !strlen(clannames[i])) cid = i;
}
if (cid == 99) return SendClientMessage(playerid,ORANGE,"too many clans are active try again later");
GetPlayerName(playerid, sendername, sizeof(sendername));
playerclan[playerid] = cid;
format(clannames[cid],10,"%s",reason);
format(string, sizeof(string), "you have created a new clan: %s",clannames[cid]);
SendClientMessage(playerid,CLANTEXT, string);
clanjoin[playerid] = 1;
return 1;
}

if(strcmp(cmd, "/clans", true) == 0) // clan listing
{
SendClientMessage(playerid,GREEN,"Listing Clans:");
for(new i = 0; i < 10; i++)
{
if (strcmp(clannames[i]," ",false) == 1 && strlen(clannames[i])) format(string,sizeof(string),"%s%s (%d) ",string,clannames[i],i);
}
if (!strlen(string)) return SendClientMessage(playerid,RED,"no active clans");
SendClientMessage(playerid,CLANTEXT,string);
return 1;
}
if(strcmp(cmd, "/cj", true) == 0 || strcmp(cmd, "/clanjoin", true) == 0) // clan create
{
if(playerclan[playerid] != 99) return SendClientMessage(playerid,ORANGE,"you are already in a clan leave before joining another one");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid,ORANGE,"USAGE: /clanjoin [Clan ID]");
new cid = strval(tmp);
new name[56];
GetPlayerName(playerid,name,sizeof(name));
if(!strlen(clannames[cid]) || (cid < 0 || cid > 9))
{
format(string,sizeof(string),"%d is not a valid clan ID", cid);
return SendClientMessage(playerid,ORANGE,string);
}
if(clanask[playerid] == cid) return SendClientMessage(playerid,RED,"you have already asked to join that clan");
if(claninvite[playerid] == cid)
{
format(string,sizeof(string),"you have joined %s use ;text for clan talk",clannames[cid]);
SendClientMessage(playerid,CLANTEXT,string);
playerclan[playerid] = cid;
format(string,sizeof(string),"[%s] %s has joined the clan",clannames[cid],name);
SendClientMessageToClan(CLANTEXT,string,cid);
claninvite[playerid] = 99;
clanjoin[playerid] = SetClanJoinID(cid);
}
else if(claninvite[playerid] != cid)
{
format(string,sizeof(string),"you have requested to join %s",clannames[cid]);
SendClientMessage(playerid,CLANTEXT,string);
format(string,sizeof(string),"[%s] %s(%d) has requested to join the clan",clannames[cid],name,playerid);
SendClientMessageToClan(CLANTEXT,string,cid);
clanask[playerid] = cid;
}
return 1;
}
if(strcmp(cmd, "/ci", true) == 0 || strcmp(cmd, "/claninvite", true) == 0) // clan create
{
if(playerclan[playerid] == 99) return SendClientMessage(playerid,ORANGE,"you are not in a clan");
if(ClanLeader(playerclan[playerid]) != playerid) return SendClientMessage(playerid,ORANGE,"only the clan leader may invite people");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid,ORANGE,"USAGE: /claninvite [ID]");
new id = ReturnUser(tmp);
new name[56], nama[56];
if(IsPlayerConnected(id))
{
if(playerclan[playerid] == playerclan[id]) return SendClientMessage(playerid,RED,"that user is already in your clan");
if(claninvite[id] == playerclan[playerid]) return SendClientMessage(playerid,RED,"that user has already been invited to your clan");
if(clanask[id] == playerclan[playerid])
{
format(string,sizeof(string),"you have joined %s use ;text for clan talk",clannames[playerclan[playerid]]);
SendClientMessage(id,CLANTEXT,string);
playerclan[id] = playerclan[playerid];
GetPlayerName(id,name,sizeof(name));
GetPlayerName(playerid,nama,sizeof(nama));
format(string,sizeof(string),"[%s] %s(%d) has been accepted in by %s",clannames[playerclan[playerid]],name,id,nama);
SendClientMessageToClan(CLANTEXT,string,playerclan[playerid]);
clanask[playerid] = 99;
clanjoin[id] = SetClanJoinID(playerclan[playerid]);
}
else if(clanask[playerid] != playerclan[playerid])
{
GetPlayerName(id,name,sizeof(name));
GetPlayerName(playerid,nama,sizeof(nama));
format(string,sizeof(string),"%s has asked you to join thier clan: %s type /cj %d to join",nama,clannames[playerclan[playerid]],playerclan[playerid]);
SendClientMessage(id,ORANGE,string);
format(string,sizeof(string),"[%s] %s has asked %s to join the clan",clannames[playerclan[playerid]],nama,name);
SendClientMessageToClan(CLANTEXT,string,playerclan[playerid]);
claninvite[id] = playerclan[playerid];
}
}
else if (!IsPlayerConnected(id))
{
format(string, sizeof(string), "%d is not an active player.", id);
SendClientMessage(playerid, RED, string);
}
return 1;
}
if(strcmp(cmd, "/cl", true) == 0 || strcmp(cmd, "/clanleave", true) == 0) // clan create
{
new name[56];
if(playerclan[playerid] == 99) return SendClientMessage(playerid,ORANGE,"you are not in a clan");
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"[%s] %s(%d) has left the clan",clannames[playerclan[playerid]],name,playerid);
SendClientMessageToClan(CLANTEXT,string,playerclan[playerid]);
new delclan = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(playerclan[i] == playerclan[playerid] && i != playerid) delclan++;
}
}
if (delclan == 0) clannames[playerclan[playerid]] = " ";
if (delclan != 0 && ClanLeader(playerclan[playerid]) == playerid)
{
new clid;
new cid;
cid = playerclan[playerid];
playerclan[playerid] = 99;
clid = ClanLeader(cid);
GetPlayerName(clid,name,sizeof(name));
format(string,sizeof(string),"[%s] %s(%d) is the new clan leader",clannames[cid],name,clid);
clanjoin[clid] = 1;
SendClientMessageToClan(CLANTEXT,string,cid);
}
playerclan[playerid] = 99;
return 1;
}
if(strcmp(cmd, "/clist", true) == 0 || strcmp(cmd, "/clanlist", true) == 0) // clan create
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp) && playerclan[playerid] == 99) return SendClientMessage(playerid,ORANGE,"you are not in a clan");
new cid = strval(tmp);
new name[56];
if(!strlen(tmp) && playerclan[playerid] != 99)
{
format(string,sizeof(string),"%s clan member list",clannames[cid]);
SendClientMessage(playerid,GREEN,string);
string = " ";
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerName(i,name,sizeof(name));
if(playerclan[i] == cid) format(string,sizeof(string),"%s%s (%d) ",string,name,i);
}
}
SendClientMessage(playerid,ORANGE,string);
return 1;
}
if(!strlen(clannames[cid]) || (cid < 0 || cid > 9))
{
format(string,sizeof(string),"%d is not a valid clan ID", cid);
return SendClientMessage(playerid,ORANGE,string);
}
format(string,sizeof(string),"%s clan member list",clannames[cid]);
SendClientMessage(playerid,GREEN,string);
string = " ";
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerName(i,name,sizeof(name));
if(playerclan[i] == cid) format(string,sizeof(string),"%s%s (%d) ",string,name,i);
}
}
SendClientMessage(playerid,ORANGE,string);
return 1;
}
if(strcmp(cmd, "/ck", true) == 0 || strcmp(cmd, "/clankick", true) == 0) // clan create
{
if(playerclan[playerid] == 99) return SendClientMessage(playerid,ORANGE,"you are not in a clan");
if(ClanLeader(playerclan[playerid]) != playerid) return SendClientMessage(playerid,ORANGE,"only the clan leader may kick people");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid,ORANGE,"USAGE: /clankick [ID]");
new id = ReturnUser(tmp);
if(id == playerid) return SendClientMessage(playerid,ORANGE,"you cannot kick yourself out, use /clanleave");
new name[56], nama[56];
if(IsPlayerConnected(id) && playerclan[id] == playerclan[playerid])
{
GetPlayerName(playerid,name,sizeof(name));
GetPlayerName(id,nama,sizeof(nama));
new delclan = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(playerclan[i] == playerclan[playerid] && i != playerid) delclan++;
}
}
format(string,sizeof(string),"[%s] you have been kicked out by %s",clannames[playerclan[playerid]],name);
SendClientMessage(id,CLANTEXT,string);
if (delclan == 0) clannames[playerclan[playerid]] = " ";
playerclan[id] = 99;
if (playerclan[playerid] != 99)
{
format(string,sizeof(string),"[%s] %s has kicked out %s",clannames[playerclan[playerid]],name,nama);
SendClientMessageToClan(CLANTEXT,string,playerclan[playerid]);
}
}
else if (!IsPlayerConnected(id))
{
format(string, sizeof(string), "%d is not an active player or is not in your clan", id);
SendClientMessage(playerid, RED, string);
}
return 1;
}

onplayerdisconnect
if(playerclan[playerid] != 99)
{
new delclan = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(playerclan[i] == playerclan[playerid] && i != playerid) delclan++;
}
}
if (delclan == 0) clannames[playerclan[playerid]] = " ";
playerclan[playerid] = 99;
}

Think that's all of it.

luigifan9
27/04/2010, 12:25 AM
Here's an old one I made, only because luigifan9 was a jerk, I was only scripting for a month or so when I made this.


What was being a jerk? You think a two week scripter can make advanced scripts in two weeks. And i only realease simple FDS's because i am currently working on a mission GM FYI...

Gummy Bear
27/04/2010, 12:31 AM
Thank you so much cessil! Thanks again!

cessil
27/04/2010, 12:33 AM
What was being a jerk? You think a two week scripter can make advanced scripts in two weeks. And i only realease simple FDS's because i am currently working on a mission GM FYI...


Just because you couldn't do that at 2weeks doesn't mean he couldn't. You could of just not posted but you had to post uselessly to laugh at him which is a jerk thing to do.
I made that script when I knew pawn for about a month.

luigifan9
27/04/2010, 12:45 AM
What was being a jerk? You think a two week scripter can make advanced scripts in two weeks. And i only realease simple FDS's because i am currently working on a mission GM FYI...


Just because you couldn't do that at 2weeks doesn't mean he couldn't. You could of just not posted but you had to post uselessly to laugh at him which is a jerk thing to do.
I made that script when I knew pawn for about a month.


that would be 3 times longer then he has been scripting

Gummy Bear
27/04/2010, 12:47 AM
What was being a jerk? You think a two week scripter can make advanced scripts in two weeks. And i only realease simple FDS's because i am currently working on a mission GM FYI...


Just because you couldn't do that at 2weeks doesn't mean he couldn't. You could of just not posted but you had to post uselessly to laugh at him which is a jerk thing to do.
I made that script when I knew pawn for about a month.


that would be 3 times longer then he has been scripting

But he still did it, that means that i could of make that in around a month or so, now stop posting some useless shit ffs, kinda annoying.

ExpressRunning
12/07/2011, 05:37 PM
Here's an old one I made, only because luigifan9 was a jerk, I was only scripting for a month or so when I made this.

top of the script
new playerclan[MAX_PLAYERS];
new clannames[10][30];
new claninvite[MAX_PLAYERS];
new clanask[MAX_PLAYERS];
new clanjoin[MAX_PLAYERS];


in commands
if(strcmp(cmd, "/cc", true) == 0 || strcmp(cmd, "/clancreate", true) == 0) // clan create
{
if(playerclan[playerid] != 99) return SendClientMessage(playerid,ORANGE,"you are already in a clan leave before creating a new one");
new reason[10];
new cid = 99;
format(reason,sizeof(reason),"%s",bigstrtok(cmdtext, idx));
if(!strlen(reason))
{
SendClientMessage(playerid, ORANGE, "USAGE: /cc [clan name]");
SendClientMessage(playerid, ORANGE, "FUNCTION: Will create a clan");
return 1;
}
for(new i = 9; i > -1; i--)
{
if (strcmp(clannames[i]," ",true) == 0 || !strlen(clannames[i])) cid = i;
}
if (cid == 99) return SendClientMessage(playerid,ORANGE,"too many clans are active try again later");
GetPlayerName(playerid, sendername, sizeof(sendername));
playerclan[playerid] = cid;
format(clannames[cid],10,"%s",reason);
format(string, sizeof(string), "you have created a new clan: %s",clannames[cid]);
SendClientMessage(playerid,CLANTEXT, string);
clanjoin[playerid] = 1;
return 1;
}

if(strcmp(cmd, "/clans", true) == 0) // clan listing
{
SendClientMessage(playerid,GREEN,"Listing Clans:");
for(new i = 0; i < 10; i++)
{
if (strcmp(clannames[i]," ",false) == 1 && strlen(clannames[i])) format(string,sizeof(string),"%s%s (%d) ",string,clannames[i],i);
}
if (!strlen(string)) return SendClientMessage(playerid,RED,"no active clans");
SendClientMessage(playerid,CLANTEXT,string);
return 1;
}
if(strcmp(cmd, "/cj", true) == 0 || strcmp(cmd, "/clanjoin", true) == 0) // clan create
{
if(playerclan[playerid] != 99) return SendClientMessage(playerid,ORANGE,"you are already in a clan leave before joining another one");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid,ORANGE,"USAGE: /clanjoin [Clan ID]");
new cid = strval(tmp);
new name[56];
GetPlayerName(playerid,name,sizeof(name));
if(!strlen(clannames[cid]) || (cid < 0 || cid > 9))
{
format(string,sizeof(string),"%d is not a valid clan ID", cid);
return SendClientMessage(playerid,ORANGE,string);
}
if(clanask[playerid] == cid) return SendClientMessage(playerid,RED,"you have already asked to join that clan");
if(claninvite[playerid] == cid)
{
format(string,sizeof(string),"you have joined %s use ;text for clan talk",clannames[cid]);
SendClientMessage(playerid,CLANTEXT,string);
playerclan[playerid] = cid;
format(string,sizeof(string),"[%s] %s has joined the clan",clannames[cid],name);
SendClientMessageToClan(CLANTEXT,string,cid);
claninvite[playerid] = 99;
clanjoin[playerid] = SetClanJoinID(cid);
}
else if(claninvite[playerid] != cid)
{
format(string,sizeof(string),"you have requested to join %s",clannames[cid]);
SendClientMessage(playerid,CLANTEXT,string);
format(string,sizeof(string),"[%s] %s(%d) has requested to join the clan",clannames[cid],name,playerid);
SendClientMessageToClan(CLANTEXT,string,cid);
clanask[playerid] = cid;
}
return 1;
}
if(strcmp(cmd, "/ci", true) == 0 || strcmp(cmd, "/claninvite", true) == 0) // clan create
{
if(playerclan[playerid] == 99) return SendClientMessage(playerid,ORANGE,"you are not in a clan");
if(ClanLeader(playerclan[playerid]) != playerid) return SendClientMessage(playerid,ORANGE,"only the clan leader may invite people");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid,ORANGE,"USAGE: /claninvite [ID]");
new id = ReturnUser(tmp);
new name[56], nama[56];
if(IsPlayerConnected(id))
{
if(playerclan[playerid] == playerclan[id]) return SendClientMessage(playerid,RED,"that user is already in your clan");
if(claninvite[id] == playerclan[playerid]) return SendClientMessage(playerid,RED,"that user has already been invited to your clan");
if(clanask[id] == playerclan[playerid])
{
format(string,sizeof(string),"you have joined %s use ;text for clan talk",clannames[playerclan[playerid]]);
SendClientMessage(id,CLANTEXT,string);
playerclan[id] = playerclan[playerid];
GetPlayerName(id,name,sizeof(name));
GetPlayerName(playerid,nama,sizeof(nama));
format(string,sizeof(string),"[%s] %s(%d) has been accepted in by %s",clannames[playerclan[playerid]],name,id,nama);
SendClientMessageToClan(CLANTEXT,string,playerclan[playerid]);
clanask[playerid] = 99;
clanjoin[id] = SetClanJoinID(playerclan[playerid]);
}
else if(clanask[playerid] != playerclan[playerid])
{
GetPlayerName(id,name,sizeof(name));
GetPlayerName(playerid,nama,sizeof(nama));
format(string,sizeof(string),"%s has asked you to join thier clan: %s type /cj %d to join",nama,clannames[playerclan[playerid]],playerclan[playerid]);
SendClientMessage(id,ORANGE,string);
format(string,sizeof(string),"[%s] %s has asked %s to join the clan",clannames[playerclan[playerid]],nama,name);
SendClientMessageToClan(CLANTEXT,string,playerclan[playerid]);
claninvite[id] = playerclan[playerid];
}
}
else if (!IsPlayerConnected(id))
{
format(string, sizeof(string), "%d is not an active player.", id);
SendClientMessage(playerid, RED, string);
}
return 1;
}
if(strcmp(cmd, "/cl", true) == 0 || strcmp(cmd, "/clanleave", true) == 0) // clan create
{
new name[56];
if(playerclan[playerid] == 99) return SendClientMessage(playerid,ORANGE,"you are not in a clan");
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"[%s] %s(%d) has left the clan",clannames[playerclan[playerid]],name,playerid);
SendClientMessageToClan(CLANTEXT,string,playerclan[playerid]);
new delclan = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(playerclan[i] == playerclan[playerid] && i != playerid) delclan++;
}
}
if (delclan == 0) clannames[playerclan[playerid]] = " ";
if (delclan != 0 && ClanLeader(playerclan[playerid]) == playerid)
{
new clid;
new cid;
cid = playerclan[playerid];
playerclan[playerid] = 99;
clid = ClanLeader(cid);
GetPlayerName(clid,name,sizeof(name));
format(string,sizeof(string),"[%s] %s(%d) is the new clan leader",clannames[cid],name,clid);
clanjoin[clid] = 1;
SendClientMessageToClan(CLANTEXT,string,cid);
}
playerclan[playerid] = 99;
return 1;
}
if(strcmp(cmd, "/clist", true) == 0 || strcmp(cmd, "/clanlist", true) == 0) // clan create
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp) && playerclan[playerid] == 99) return SendClientMessage(playerid,ORANGE,"you are not in a clan");
new cid = strval(tmp);
new name[56];
if(!strlen(tmp) && playerclan[playerid] != 99)
{
format(string,sizeof(string),"%s clan member list",clannames[cid]);
SendClientMessage(playerid,GREEN,string);
string = " ";
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerName(i,name,sizeof(name));
if(playerclan[i] == cid) format(string,sizeof(string),"%s%s (%d) ",string,name,i);
}
}
SendClientMessage(playerid,ORANGE,string);
return 1;
}
if(!strlen(clannames[cid]) || (cid < 0 || cid > 9))
{
format(string,sizeof(string),"%d is not a valid clan ID", cid);
return SendClientMessage(playerid,ORANGE,string);
}
format(string,sizeof(string),"%s clan member list",clannames[cid]);
SendClientMessage(playerid,GREEN,string);
string = " ";
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerName(i,name,sizeof(name));
if(playerclan[i] == cid) format(string,sizeof(string),"%s%s (%d) ",string,name,i);
}
}
SendClientMessage(playerid,ORANGE,string);
return 1;
}
if(strcmp(cmd, "/ck", true) == 0 || strcmp(cmd, "/clankick", true) == 0) // clan create
{
if(playerclan[playerid] == 99) return SendClientMessage(playerid,ORANGE,"you are not in a clan");
if(ClanLeader(playerclan[playerid]) != playerid) return SendClientMessage(playerid,ORANGE,"only the clan leader may kick people");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid,ORANGE,"USAGE: /clankick [ID]");
new id = ReturnUser(tmp);
if(id == playerid) return SendClientMessage(playerid,ORANGE,"you cannot kick yourself out, use /clanleave");
new name[56], nama[56];
if(IsPlayerConnected(id) && playerclan[id] == playerclan[playerid])
{
GetPlayerName(playerid,name,sizeof(name));
GetPlayerName(id,nama,sizeof(nama));
new delclan = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(playerclan[i] == playerclan[playerid] && i != playerid) delclan++;
}
}
format(string,sizeof(string),"[%s] you have been kicked out by %s",clannames[playerclan[playerid]],name);
SendClientMessage(id,CLANTEXT,string);
if (delclan == 0) clannames[playerclan[playerid]] = " ";
playerclan[id] = 99;
if (playerclan[playerid] != 99)
{
format(string,sizeof(string),"[%s] %s has kicked out %s",clannames[playerclan[playerid]],name,nama);
SendClientMessageToClan(CLANTEXT,string,playerclan[playerid]);
}
}
else if (!IsPlayerConnected(id))
{
format(string, sizeof(string), "%d is not an active player or is not in your clan", id);
SendClientMessage(playerid, RED, string);
}
return 1;
}

onplayerdisconnect
if(playerclan[playerid] != 99)
{
new delclan = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(playerclan[i] == playerclan[playerid] && i != playerid) delclan++;
}
}
if (delclan == 0) clannames[playerclan[playerid]] = " ";
playerclan[playerid] = 99;
}

Think that's all of it.

Can you give me a link to download the FS's? I know I do not OWN: D pleeasse

cessil
13/07/2011, 05:20 AM
I posted in this thread to help people learn, not to give away script for free, the script I posted is outdated but can still be applied using updated methods.
If you need help creating a clan system then I might help, if you want free working scripts without learning anything then there's the release section.

Steven82
13/07/2011, 06:09 AM
Wow, this thread is old..

Papana
29/01/2012, 08:24 PM
Well I have him in my GM commands
example:
COMMAND: exitdm (playerid, params [])

you can do on these guys right?

henry jiggy
29/01/2012, 10:01 PM
if(Papana_BUMPED_A_1_YEAR_OLD_TOPIC == 1)
{
Warn(Papana);
print("warned");
}


Output:

warned

SSJ
14/04/2013, 01:19 PM
bro where is the download button