11.04.2010, 09:05
Where to find that script if(strcmp(cmd, "/allowcreation", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pLeader] == 6)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /allowcreation [FamilyNr] [playerid/PartOfName]");
return 1;
}
new family = strval(tmp);
if(family < 1 || family > 10) { SendClientMessage(playerid, COLOR_GREY, " FamilyNr can't be below 1 or above 10 !"); return 1; }
if(PlayerInfo[playerid][pLeader] == 5 && family > 5) { SendClientMessage(playerid, COLOR_GREY, " La Cosa Nostra Leader can only take FamilyNr 1 till 5 !"); return 1; }
else if(PlayerInfo[playerid][pLeader] == 6 && family < 6) { SendClientMessage(playerid, COLOR_GREY, " Yakuza Leader can only take FamilyNr 6 till 10 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /allowcreation [FamilyNr] [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
family -= 1;
if(FamilyInfo[family][FamilyTaken] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " That FamilyNr is already taken !" );
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* You've made %s the Leader of FamilyNr %d.",giveplayer,family);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
if(PlayerInfo[playerid][pLeader] == 5)
{
format(string, sizeof(string), "* La Cosa Nostra Leader %s has made you a Family Leader of FamilyNr %d.",sendername,family);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
}
else if(PlayerInfo[playerid][pLeader] == 6)
{
format(string, sizeof(string), "* Yakuza Leader %s has made you a Family Leader of FamilyNr %d.",sendername,family);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
}
format(string, sizeof(string), "%s",giveplayer);
strmid(FamilyInfo[family][FamilyLeader], string, 0, strlen(string), 255);
FamilyInfo[family][FamilyMembers] ++;
FamilyInfo[family][FamilyTaken] = 1;
PlayerInfo[giveplayerid][pFMember] = family;
SaveFamilies();
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player is Offline !");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not the Leader of one of the Organisations !");
return 1;
}
}
return 1;
}
if(strcmp(cmd, "/deletecreation", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pLeader] == 6)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /deletecreation [FamilyNr]");
return 1;
}
new family = strval(tmp);
if(family < 1 || family > 10) { SendClientMessage(playerid, COLOR_GREY, " FamilyNr can't be below 1 or above 10 !"); return 1; }
if(PlayerInfo[playerid][pLeader] == 5 && family > 5) { SendClientMessage(playerid, COLOR_GREY, " La Cosa Nostra Leader can only take FamilyNr 1 till 5 !"); return 1; }
else if(PlayerInfo[playerid][pLeader] == 6 && family < 6) { SendClientMessage(playerid, COLOR_GREY, " Yakuza Leader can only take FamilyNr 6 till 10 !"); return 1; }
family -= 1;
if(FamilyInfo[family][FamilyTaken] != 1)
{
SendClientMessage(playerid, COLOR_GREY, " That FamilyNr isn't taken !");
return 1;
}
ClearFamily(family);
SaveFamilies();
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not the Leader of one of the Organisations !");
return 1;
}
}
return 1;
}
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pLeader] == 6)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /allowcreation [FamilyNr] [playerid/PartOfName]");
return 1;
}
new family = strval(tmp);
if(family < 1 || family > 10) { SendClientMessage(playerid, COLOR_GREY, " FamilyNr can't be below 1 or above 10 !"); return 1; }
if(PlayerInfo[playerid][pLeader] == 5 && family > 5) { SendClientMessage(playerid, COLOR_GREY, " La Cosa Nostra Leader can only take FamilyNr 1 till 5 !"); return 1; }
else if(PlayerInfo[playerid][pLeader] == 6 && family < 6) { SendClientMessage(playerid, COLOR_GREY, " Yakuza Leader can only take FamilyNr 6 till 10 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /allowcreation [FamilyNr] [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
family -= 1;
if(FamilyInfo[family][FamilyTaken] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " That FamilyNr is already taken !" );
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* You've made %s the Leader of FamilyNr %d.",giveplayer,family);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
if(PlayerInfo[playerid][pLeader] == 5)
{
format(string, sizeof(string), "* La Cosa Nostra Leader %s has made you a Family Leader of FamilyNr %d.",sendername,family);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
}
else if(PlayerInfo[playerid][pLeader] == 6)
{
format(string, sizeof(string), "* Yakuza Leader %s has made you a Family Leader of FamilyNr %d.",sendername,family);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
}
format(string, sizeof(string), "%s",giveplayer);
strmid(FamilyInfo[family][FamilyLeader], string, 0, strlen(string), 255);
FamilyInfo[family][FamilyMembers] ++;
FamilyInfo[family][FamilyTaken] = 1;
PlayerInfo[giveplayerid][pFMember] = family;
SaveFamilies();
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player is Offline !");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not the Leader of one of the Organisations !");
return 1;
}
}
return 1;
}
if(strcmp(cmd, "/deletecreation", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pLeader] == 6)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /deletecreation [FamilyNr]");
return 1;
}
new family = strval(tmp);
if(family < 1 || family > 10) { SendClientMessage(playerid, COLOR_GREY, " FamilyNr can't be below 1 or above 10 !"); return 1; }
if(PlayerInfo[playerid][pLeader] == 5 && family > 5) { SendClientMessage(playerid, COLOR_GREY, " La Cosa Nostra Leader can only take FamilyNr 1 till 5 !"); return 1; }
else if(PlayerInfo[playerid][pLeader] == 6 && family < 6) { SendClientMessage(playerid, COLOR_GREY, " Yakuza Leader can only take FamilyNr 6 till 10 !"); return 1; }
family -= 1;
if(FamilyInfo[family][FamilyTaken] != 1)
{
SendClientMessage(playerid, COLOR_GREY, " That FamilyNr isn't taken !");
return 1;
}
ClearFamily(family);
SaveFamilies();
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not the Leader of one of the Organisations !");
return 1;
}
}
return 1;
}