31.03.2012, 23:11
Hello.
i tried to make my own faction al' queda but it don't work i means everything is working except /f when i type /f it says You're not a part of a Family! why please help me Here My Script
i tried to make my own faction al' queda but it don't work i means everything is working except /f when i type /f it says You're not a part of a Family! why please help me Here My Script
pawn Код:
stock GetPlayerFactionInfo(targetid, rank[64], division[64], employer[64])
{
switch (PlayerInfo[targetid][pMember]) { // employer/rank/division data is pulled from here
case 1:
{
employer = "LSPD";
switch(PlayerInfo[targetid][pRank]) {
case 1: rank = "Officer";
case 2: rank = "Detective";
case 3: rank = "Sergeant";
case 4: rank = "Lieutenant";
case 5: rank = "Captain";
case 6: rank = "Chief";
default: rank = "Cadet";
}
switch(PlayerInfo[targetid][pDivision]) {
case 1: division = "General Duties";
case 2: division = "II";
case 3: division = "FTO";
case 4: division = "IA";
case 5: division = "SWAT";
default: division = "General Duties";
}
}
case 2:
{
employer = "CIA";
switch(PlayerInfo[targetid][pRank]) {
case 1: rank = "Staff";
case 2: rank = "Agent";
case 3: rank = "Senior Agent";
case 4: rank = "Special Agent";
case 5: rank = "Assistant Director";
case 6: rank = "Director";
default: rank = "Intern";
}
switch(PlayerInfo[targetid][pDivision]) {
case 1: division = "General Duties";
case 2: division = "GU";
case 3: division = "FAN";
case 4: division = "CID";
case 5: division = "IA";
case 6: division = "NSB";
default: division = "General Duties";
}
}
case 3:
{
employer = "SASP";
switch(PlayerInfo[targetid][pRank]) {
case 1: rank = "Officer";
case 2: rank = "Corporal";
case 3: rank = "Sergeant";
case 4: rank = "Lieutenant";
case 5: rank = "Captain";
case 6: rank = "Chief";
default: rank = "Cadet";
}
switch(PlayerInfo[targetid][pDivision]) {
case 1: division = "HR";
case 2: division = "ERT";
case 3: division = "IA";
case 4: division = "SO";
default: division = "General Duties";
}
}
case 4:
{
employer = "EMS";
switch(PlayerInfo[targetid][pRank]) {
case 1: rank = "EMT Intermediate";
case 2: rank = "EMT Paramedic";
case 3: rank = "Lieutenant";
case 4: rank = "Captain";
case 5: rank = "Deputy Chief";
case 6: rank = "Chief";
default: rank = "EMT Basic";
}
switch(PlayerInfo[targetid][pDivision]) {
case 1: division = "FD";
case 2: division = "Life Flight";
case 3: division = "T&R";
default: division = "General Duties";
}
}
case 5:
{
employer = "";
switch(PlayerInfo[targetid][pRank]) {
case 1: rank = "Clerk of Court";
case 2: rank = "District Attorney";
case 3: rank = "District Judge";
case 4: rank = "Appellate Judge";
case 5: rank = "Associate Justice of the Supreme Court";
case 6: rank = "Chief Justice of the Supreme Court";
default: rank = "Clerk of Court";
}
division = "None";
}
case 6:
{
employer = "State Government";
switch(PlayerInfo[targetid][pRank]) {
case 1: rank = "Staff Member";
case 2: rank = "G.E.T. Officer";
case 3: rank = "Legislator";
case 4: rank = "Government Cabinet";
case 5: rank = "Lieutenant Governor";
case 6: rank = "Governor";
default: rank = "Intern";
}
division = "None";
}
case 7:
{
employer = "RCSD";
switch(PlayerInfo[targetid][pRank]) {
case 1: rank = "Corporal";
case 2: rank = "Sergeant";
case 3: rank = "Lieutenant";
case 4: rank = "Captain";
case 5: rank = "Commander";
case 6: rank = "Sheriff";
default: rank = "Deputy";
}
switch(PlayerInfo[targetid][pDivision]) {
case 2: division = "TET";
case 3: division = "SCU";
case 4: division = "SORT";
case 5: division = "FTO";
default: division = "General Duties";
}
}
case 8:
{
employer = "Hitman Agency";
switch(PlayerInfo[targetid][pRank]) {
case 1: rank = "Freelancer";
case 2: rank = "Marksman";
case 3: rank = "Agent";
case 4: rank = "Special Agent";
case 5: rank = "Vice Director";
case 6: rank = "Director";
default: rank = "Freelancer";
}
division = "None";
}
case 9:
{
employer = "SAMedia";
switch(PlayerInfo[targetid][pRank]) {
case 1: rank = "Local Reporter";
case 2: rank = "Local Editor";
case 3: rank = "Network Anchor";
case 4: rank = "Network Editor";
case 5: rank = "Asst. Network Producer";
case 6: rank = "Network Producer";
default: rank = "Intern";
}
switch(PlayerInfo[targetid][pDivision]) {
case 1: division = "Security";
case 2: division = "IA";
case 3: division = "Tech Support";
case 4: division = "TnR";
default: division = "General";
}
}
case 10:
{
employer = "San Andreas Cabbie Service";
switch(PlayerInfo[targetid][pRank]) {
case 1: rank = "Trainee";
case 2: rank = "Taxi Rookie";
case 3: rank = "Cabbie";
case 4: rank = "Dispatcher";
case 5: rank = "Shift Supervisor";
case 6: rank = "SACS Owner";
default: rank = "Trainee";
}
division = "None";
}
case 11:
{
employer = "National Guard";
switch(PlayerInfo[targetid][pRank]) {
case 0: rank = "Private";
case 1: rank = "Corporal";
case 2: rank = "Sergeant";
case 3: rank = "Lieutenant";
case 4: rank = "Captain";
case 5: rank = "Major";
case 6: rank = "General";
default: rank = "Private";
}
switch(PlayerInfo[targetid][pDivision]) {
case 1: division = "AIR";
case 2: division = "ARM";
case 3: division = "VET";
case 4: division = "AIR SF";
case 5: division = "ARM SF";
case 6: division = "INF";
default: division = "General Duties";
}
}
case 12:
{
employer = "The Nation Of Tierra Robada";
if(PlayerInfo[targetid][pDivision] == 1 || PlayerInfo[targetid][pDivision] == 0) {
switch(PlayerInfo[targetid][pRank]) {
case 1: rank = "Citizen";
case 2: rank = "People's Representative";
case 3: rank = "Tribal Representative";
case 4: rank = "Mayor";
case 5: rank = "Ruling Council Member";
case 6: rank = "Executive Officer of RC";
default: rank = "Citizen";
}
}
else if(PlayerInfo[targetid][pDivision] == 2) {
switch(PlayerInfo[targetid][pRank]) {
case 1: rank = "Citizen";
case 2: rank = "Private";
case 3: rank = "Lieutenant";
case 4: rank = "Captain";
case 5: rank = "General";
case 6: rank = "Executive Officer of RC";
default: rank = "Citizen";
}
}
else if(PlayerInfo[targetid][pDivision] == 3) {
switch(PlayerInfo[targetid][pRank]) {
case 1: rank = "Citizen";
case 2: rank = "Trainee";
case 3: rank = "Lieutenant";
case 4: rank = "Captain";
case 5: rank = "Chief";
case 6: rank = "Executive Officer of RC";
default: rank = "Citizen";
}
}
else if(PlayerInfo[targetid][pDivision] == 4) {
switch(PlayerInfo[targetid][pRank]) {
case 1: rank = "Citizen";
case 2: rank = "Aide";
case 3: rank = "Staff";
case 4: rank = "Ambassador";
case 5: rank = "Councelor General";
case 6: rank = "Executive Officer of RC";
default: rank = "Citizen";
}
}
switch(PlayerInfo[targetid][pDivision]) {
case 1: division = "Civil";
case 2: division = "AF";
case 3: division = "ES";
case 4: division = "DC";
default: division = "Civil";
}
}
case 13:
{
employer = "NOOSE";
switch(PlayerInfo[targetid][pRank]) {
case 0: rank = "Ensign";
case 1: rank = "Marksman";
case 2: rank = "Elite Marksman";
case 3: rank = "Operative";
case 4: rank = "Elite Operative";
case 5: rank = "Vice Commander";
case 6: rank = "Supreme Commander";
default: rank = "Ensign";
}
division = "General Duties";
}
case 14:
{
employer = "Al' Queda";
switch(PlayerInfo[targetid][pRank]) {
case 1: rank = "Al' Queda Trainee";
case 2: rank = "Al' Queda Rookie";
case 3: rank = "Al' Queda";
case 4: rank = "Al' Queda Doggy";
case 5: rank = "Al' Queda Supervisor";
case 6: rank = "Al' Queda Owner";
default: rank = "Al' Queda Trainee";
}
division = "None";
}
default: { employer = "None"; division = "None"; rank = "N/A"; }
}
return 1;
}
pawn Код:
case 1:
{
SendClientMessageEx(playerid, COLOR_WHITE, "*** LSPD *** (/r)adio (/d)epartments (/m)egaphone (/su)spect /LSPD /mdc /detain /parrest /warrantarrest /wanted /cuff /tazer /cam");
SendClientMessageEx(playerid, COLOR_WHITE, "*** LSPD *** /frisk /take /ticket (/gov)ernment /clothes /ram /invite /giverank /deployspikes /destroyspikes /spikestrip /wants");
SendClientMessageEx(playerid, COLOR_WHITE, "*** LSPD *** /deploycade /destroycade /revokedl /vcheck /vmdc /vticket /tow /untow /impound /LSPDdiv /destroyplant /radargun /searchcar");
}
case 2:
{
SendClientMessageEx(playerid, COLOR_WHITE, "*** CIA *** (/r)adio (/d)epartments (/m)egaphone (/su)spect /cia /mdc /detain /parrest /warrantarrest /wanted /cuff /tazer /bug /togbr");
SendClientMessageEx(playerid, COLOR_WHITE, "*** CIA *** /frisk /take /ticket (/gov)ernment /clothes /ram /invite /giverank /deployspikes /destroyspikes /spikestrip /wants /searchcar");
SendClientMessageEx(playerid, COLOR_WHITE, "*** CIA *** /deploycade /destroycade /revokedl /revokeairdl /vcheck /vmdc /vticket /tow /untow /impound /ciadiv /destroyplant /radargun");
}
case 3:
{
SendClientMessageEx(playerid, COLOR_WHITE, "*** SASP *** (/r)adio (/d)epartments (/m)egaphone (/su)spect /SASP /mdc /detain /parrest /warrantarrest /jarrest /wanted /cuff /tazer /wants");
SendClientMessageEx(playerid, COLOR_WHITE, "*** SASP *** /frisk /take /ticket (/gov)ernment /deliver /clothes /ram /invite /giverank /deployspikes /destroyspikes /spikestrip /present");
SendClientMessageEx(playerid, COLOR_WHITE, "*** SASP *** /deploycade /destroycade /revokedl /vcheck /vmdc /vticket /tow /untow /impound /SASPdiv /destroyplant /radargun /searchcar");
}
case 4:
{
SendClientMessageEx(playerid, COLOR_WHITE, "*** EMS *** (/r)adio (/d)epartments (/m)egaphone /heal /clothes /invite /giverank /ems /revokeboatdl /emsdiv");
SendClientMessageEx(playerid, COLOR_WHITE, "*** EMS *** /getpt /movept /loadpt /deliverpt /destroyplant");
}
case 5:
{
SendClientMessageEx(playerid, COLOR_WHITE, "*** Law and Order *** (/r)adio (/d)epartments /warrant /warrantwd /judgefine /judgejail /judgeprison /probation /wants");
SendClientMessageEx(playerid, COLOR_WHITE, "*** Law and Order *** /invite /uninvite /giverank /trial /adjourn /sentence /reward /checkjudgements /reversejudgement /present");
}
case 6:
{
if(PlayerInfo[playerid][pRank] < 3)
{
SendClientMessageEx(playerid, COLOR_WHITE, "*** GOVERNMENT *** (/r)adio (/d)epartments (/se)nate /mdc /deployspikes /spikestrip");
}
else
{
SendClientMessageEx(playerid, COLOR_WHITE, "*** GOVERNMENT *** (/r)adio (/d)epartments (/se)nate /settax /checktax /taxwithdraw /invite /giverank (/gov)ernment (/su)spect");
SendClientMessageEx(playerid, COLOR_WHITE, "*** GOVERNMENT *** /mdc /detain /arrest /wanted /cuff /tazer /frisk /take /ticket /clothes /ram /invite /giverank");
SendClientMessageEx(playerid, COLOR_WHITE, "*** GOVERNMENT *** /spikestrip /destroyplant /radargun /warrantarrest /pardon /commute /wants /deployspikes /destroyspikes");
}
}
case 7:
{
SendClientMessageEx(playerid, COLOR_WHITE, "*** RCSD *** (/r)adio (/d)epartments (/m)egaphone (/su)spect /RCSD /mdc /detain /parrest /warrantarrest /wanted /cuff /tazer");
SendClientMessageEx(playerid, COLOR_WHITE, "*** RCSD *** /frisk /take /ticket (/gov)ernment /clothes /ram /invite /giverank /deployspikes /destroyspikes /spikestrip /wants");
SendClientMessageEx(playerid, COLOR_WHITE, "*** RCSD *** /deploycade /destroycade /revokedl /vcheck /vmdc /vticket /tow /untow /impound /RCSDdiv /destroyplant /searchcar");
}
case 8:
{
SendClientMessageEx(playerid, COLOR_WHITE, "*** HITMAN AGENCY *** (/f)amily /contracts /givemehit /order /ranks /profile");
SendClientMessageEx(playerid, COLOR_WHITE, "*** HITMAN AGENCY *** /plantbomb /plantcarbomb /pickupbomb /clothes /invite /giverank /showmehq /showmehq2 /showmehq3");
}
case 9:
{
SendClientMessageEx(playerid, COLOR_WHITE, "*** NEWS AGENCY *** /live /nr [text] /broadcast /cameraangle /clothes /invite /giverank /lockhq /liveban /newsdiv");
}
case 10:
{
SendClientMessageEx(playerid, COLOR_WHITE, "*** TAXI *** /fare /clothes /invite /giverank");
}
case 11:
{
SendClientMessageEx(playerid, COLOR_WHITE, "*** NG *** /r /d /mdc /backup /tazer /ram /shutdown /take /frisk /radargun /(un)cuff /detain /ticket /su");
SendClientMessageEx(playerid, COLOR_WHITE, "*** NG *** /wanted /checkjudgements /wants /warrantarrest /destroyplant /vmdc /vticket /vcheck /searchcar");
SendClientMessageEx(playerid, COLOR_WHITE, "*** NG *** /spikestrip /deploy(destroy)cade /deploy(destroy)spikes /(no)backup /gov /ngdiv /showmeship /ndeliver");
}
case 12:
{
SendClientMessageEx(playerid, COLOR_WHITE, "*** The Nation Of Tierra Robada *** (/r)adio /trlocker /trdiv /clothes /invite /uninvite /giverank /gov /showbadge");
if(PlayerInfo[playerid][pDivision] == 2)
{
SendClientMessageEx(playerid, COLOR_WHITE, "*** The Nation Of Tierra Robada ARMED FORCES *** (/m)egaphone /tazer /detain /cuff /parrest /ticket /frisk");
}
if(PlayerInfo[playerid][pDivision] == 3)
{
SendClientMessageEx(playerid, COLOR_WHITE, "*** The Nation Of Tierra Robada EMERGENCY SERVICES *** (/m)egaphone /heal /movept /loadpt /deliverpt");
}
}
case 13:
{
SendClientMessageEx(playerid, COLOR_WHITE, "*** NOOSE *** (/r)adio (/d)epartments (/m)egaphone (/su)spect /NOOSE /mdc /detain /parrest /warrantarrest /wanted /cuff /tazer");
SendClientMessageEx(playerid, COLOR_WHITE, "*** NOOSE *** /frisk /take /ticket /ram /invite /giverank /deployspikes /destroyspikes /spikestrip /wants");
SendClientMessageEx(playerid, COLOR_WHITE, "*** NOOSE *** /deploycade /destroycade /vcheck /vmdc /destroyplant /radargun /searchcar");
}
case 14:
{
SendClientMessageEx(playerid, COLOR_WHITE, "*** Al' Queda *** (/f)amily /contracts /givemehit /order /ranks /profile");
SendClientMessageEx(playerid, COLOR_WHITE, "*** Al' Queda *** /plantbomb /plantcarbomb /pickupbomb /clothes /invite /giverank /showmehq /showmehq2 /showmehq3");
}
}
pawn Код:
CMD:switchfac(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pFactionModerator] >= 1)
{
new string[128], factionid;
if(sscanf(params, "d", factionid))
{
SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /switchfac [factionid]");
SendClientMessageEx(playerid, COLOR_GRAD3, "|1 LSPD |2 CIA |3 SASP |4 EMS |5 Law and Order");
SendClientMessageEx(playerid, COLOR_GRAD2, "|6 Government |7 RCSD |9 SA News");
SendClientMessageEx(playerid, COLOR_GRAD1, "|10 SACS |11 NG |12 The Nation Of Tierra Robada");
SendClientMessageEx(playerid, COLOR_GRAD1, "|13 NOOSE |14 Al' Queda");
return 1;
}
switch(factionid)
{
case 1:
{
format(string, sizeof(string), "You have switched to faction ID %d (LSPD).", factionid);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
PlayerInfo[playerid][pMember] = factionid;
PlayerInfo[playerid][pRank] = 6;
PlayerInfo[playerid][pFMember] = 255;
}
case 2:
{
format(string, sizeof(string), "You have switched to faction ID %d (CIA).", factionid);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
PlayerInfo[playerid][pMember] = factionid;
PlayerInfo[playerid][pRank] = 6;
PlayerInfo[playerid][pFMember] = 255;
}
case 3:
{
format(string, sizeof(string), "You have switched to faction ID %d (SASP).", factionid);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
PlayerInfo[playerid][pMember] = factionid;
PlayerInfo[playerid][pRank] = 6;
PlayerInfo[playerid][pFMember] = 255;
}
case 4:
{
format(string, sizeof(string), "You have switched to faction ID %d (EMS).", factionid);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
PlayerInfo[playerid][pMember] = factionid;
PlayerInfo[playerid][pRank] = 6;
PlayerInfo[playerid][pFMember] = 255;
}
case 5:
{
format(string, sizeof(string), "You have switched to faction ID %d (Law and Order).", factionid);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
PlayerInfo[playerid][pMember] = factionid;
PlayerInfo[playerid][pRank] = 6;
PlayerInfo[playerid][pFMember] = 255;
}
case 6:
{
format(string, sizeof(string), "You have switched to faction ID %d (Government).", factionid);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
PlayerInfo[playerid][pMember] = factionid;
PlayerInfo[playerid][pRank] = 6;
PlayerInfo[playerid][pFMember] = 255;
}
case 7:
{
format(string, sizeof(string), "You have switched to faction ID %d (RCSD).", factionid);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
PlayerInfo[playerid][pMember] = factionid;
PlayerInfo[playerid][pRank] = 6;
PlayerInfo[playerid][pFMember] = 255;
}
case 8:
{
/*format(string, sizeof(string), "You have switched to faction ID %d (Hitman Agency).", factionid);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
PlayerInfo[playerid][pMember] = factionid;
PlayerInfo[playerid][pRank] = 6;
PlayerInfo[playerid][pFMember] = 255;*/
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You can not switch to the Hitman Agency with /switchfac.");
}
case 9:
{
format(string, sizeof(string), "You have switched to faction ID %d (SA News).", factionid);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
PlayerInfo[playerid][pMember] = factionid;
PlayerInfo[playerid][pRank] = 6;
PlayerInfo[playerid][pFMember] = 255;
}
case 10:
{
format(string, sizeof(string), "You have switched to faction ID %d (SACS).", factionid);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
PlayerInfo[playerid][pMember] = factionid;
PlayerInfo[playerid][pRank] = 6;
PlayerInfo[playerid][pFMember] = 255;
}
case 11:
{
format(string, sizeof(string), "You have switched to faction ID %d (National Guard).", factionid);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
PlayerInfo[playerid][pMember] = factionid;
PlayerInfo[playerid][pRank] = 6;
PlayerInfo[playerid][pFMember] = 255;
}
case 12:
{
format(string, sizeof(string), "You have switched to faction ID %d (The Nation Of Tierra Robada).", factionid);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
PlayerInfo[playerid][pMember] = factionid;
PlayerInfo[playerid][pRank] = 6;
PlayerInfo[playerid][pFMember] = 255;
}
case 13:
{
format(string, sizeof(string), "You have switched to faction ID %d (NOOSE).", factionid);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
PlayerInfo[playerid][pMember] = factionid;
PlayerInfo[playerid][pRank] = 6;
PlayerInfo[playerid][pFMember] = 255;
}
case 14:
{
format(string, sizeof(string), "You have switched to faction ID %d (Al' Queda).", factionid);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
PlayerInfo[playerid][pMember] = factionid;
PlayerInfo[playerid][pRank] = 6;
PlayerInfo[playerid][pFMember] = 255;
}
default:
{
SendClientMessageEx( playerid, COLOR_WHITE, "Invalid Faction ID!" );
SendClientMessageEx(playerid, COLOR_GRAD3, "|1 LSPD |2 CIA |3 SASP |4 EMS |6 Government ");
SendClientMessageEx(playerid, COLOR_GRAD2, "|7 RCSD |8 Hitman |9 SA News");
SendClientMessageEx(playerid, COLOR_GRAD1, "|10 SACS |11 NG |12 The Nation Of Tierra Robada");
SendClientMessageEx(playerid, COLOR_GRAD1, "|13 NOOSE |14 Al' Queda");
}
}
}
return 1;
}
pawn Код:
CMD:invite(playerid, params[])
{
if (PlayerInfo[playerid][pLeader] >= 1)
{
new string[128], ftext[50], giveplayerid;
if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /invite [playerid]");
if(IsPlayerConnected(giveplayerid))
{
if (PlayerInfo[giveplayerid][pLeader] == 0 && PlayerInfo[giveplayerid][pMember] == 0 && PlayerInfo[giveplayerid][pFMember] == 255)
{
if(PlayerInfo[playerid][pLeader] == 1) { ftext = "LSPD"; }
else if(PlayerInfo[playerid][pLeader] == 2) { ftext = "CIA"; }
else if(PlayerInfo[playerid][pLeader] == 3) { ftext = "SASP"; }
else if(PlayerInfo[playerid][pLeader] == 4) { ftext = "EMS"; }
else if(PlayerInfo[playerid][pLeader] == 5) { ftext = "Law and Order"; }
else if(PlayerInfo[playerid][pLeader] == 6) { ftext = "The Government"; }
else if(PlayerInfo[playerid][pLeader] == 7) { ftext = "RCSD"; }
else if(PlayerInfo[playerid][pLeader] == 8) { ftext = "Hitman Agency"; }
else if(PlayerInfo[playerid][pLeader] == 9) { ftext = "SAMedia"; }
else if(PlayerInfo[playerid][pLeader] == 10) { ftext = "San Andreas Cabbie Service"; }
else if(PlayerInfo[playerid][pLeader] == 11) { ftext = "National Guard"; }
else if(PlayerInfo[playerid][pLeader] == 12) { ftext = "The Nation Of Tierra Robada"; }
else if(PlayerInfo[playerid][pLeader] == 13) { ftext = "NOOSE"; }
else if(PlayerInfo[playerid][pLeader] == 14) { ftext = "Al' Queda"; }
else { return 1; }
InviteOffer[giveplayerid] = playerid;
InviteFamily[giveplayerid] = 255;
InviteFaction[giveplayerid] = PlayerInfo[playerid][pLeader];
format(string, sizeof(string), "You have been invited to join the %s by %s - type /accept faction.", ftext, GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "You have invited %s to join the %s.", GetPlayerNameEx(giveplayerid),ftext);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "The player you're trying to invite is already in another faction or family.");
return 1;
}
}
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command - only leaders can do this.");
}
return 1;
}
pawn Код:
CMD:makeleader(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
new string[128], giveplayerid, faction;
if(sscanf(params, "ud", giveplayerid, faction))
{
SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /makeleader [playerid] [factionid]");
SendClientMessageEx(playerid, COLOR_GRAD3, "|1 LSPD |2 CIA |3 SASP |4 EMS |5 Law and Order");
SendClientMessageEx(playerid, COLOR_GRAD2, "|6 Government |7 RCSD |8 Hitman |9 SA News");
SendClientMessageEx(playerid, COLOR_GRAD1, "|10 SACS |11 NG |12 The Nation Of Tierra Robada");
SendClientMessageEx(playerid, COLOR_GRAD1, "|13 NOOSE |14 Al' Queda");
return 1;
}
if(faction > 15 || faction < 0) { SendClientMessageEx(playerid, COLOR_GREY, " Don't go below number 0, or above number 15!"); return 1; }
if(IsPlayerConnected(giveplayerid))
{
new ftext[30];
PlayerInfo[giveplayerid][pLeader] = faction;
PlayerInfo[giveplayerid][pRank] = 6;
PlayerInfo[giveplayerid][pMember] = faction;
if(PlayerInfo[giveplayerid][pLeader] == 1) { ftext = "LSPD"; }
else if(PlayerInfo[giveplayerid][pLeader] == 2) { ftext = "CIA"; }
else if(PlayerInfo[giveplayerid][pLeader] == 3) { ftext = "SASP"; }
else if(PlayerInfo[giveplayerid][pLeader] == 4) { ftext = "EMS"; }
else if(PlayerInfo[giveplayerid][pLeader] == 5) { ftext = "Law and Order"; }
else if(PlayerInfo[giveplayerid][pLeader] == 6) { ftext = "The Government"; }
else if(PlayerInfo[giveplayerid][pLeader] == 7) { ftext = "RCSD"; }
else if(PlayerInfo[giveplayerid][pLeader] == 8) { ftext = "Hitman Agency"; }
else if(PlayerInfo[giveplayerid][pLeader] == 9) { ftext = "SA News"; }
else if(PlayerInfo[giveplayerid][pLeader] == 10) { ftext = "San Andreas Cabbie Service"; }
else if(PlayerInfo[giveplayerid][pLeader] == 11) { ftext = "National Guard"; }
else if(PlayerInfo[giveplayerid][pLeader] == 12) { ftext = "The Nation Of Tierra Robada"; }
else if(PlayerInfo[giveplayerid][pLeader] == 13) { ftext = "NOOSE"; }
else if(PlayerInfo[giveplayerid][pLeader] == 14) { ftext = "Al' Queda"; }
else { return 1; }
format(string, sizeof(string), "You have been made the leader of the %s by Administrator %s.",ftext, GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "You have made %s the leader of the %s.", GetPlayerNameEx(giveplayerid),ftext);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
if(faction < 4 && faction > 0 || faction > 4 && faction < 7)
{
gTeam[giveplayerid] = 2;
PlayerInfo[giveplayerid][pTeam] = 2;
}
PlayerInfo[giveplayerid][pFMember] = 255;
}
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
}
return 1;
}
pawn Код:
CMD:f(playerid, params[])
{
if(gFam[playerid] == 1)
{
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "You have your family chat disabled. /togfamily!");
return 1;
}
new string[128];
if(isnull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: (/f)amily [family chat]");
if((8 <= PlayerInfo[playerid][pMember] <= 10) || PlayerInfo[playerid][pFMember] < 255)
{
new member = PlayerInfo[playerid][pMember];
new fam = PlayerInfo[playerid][pFMember];
if(member==8)
{
if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** (6) Director %s: %s **", GetPlayerNameEx(playerid), params); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** (5) Vice Director %s: %s **", GetPlayerNameEx(playerid), params); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** (4) Special Agent %s: %s **", GetPlayerNameEx(playerid), params); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** (3) Agent %s: %s **", GetPlayerNameEx(playerid), params); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** (2) Marksman %s: %s **", GetPlayerNameEx(playerid), params); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** (1) Freelancer %s: %s **", GetPlayerNameEx(playerid), params); }
else { format(string, sizeof(string), "** (1) Freelancer %s: %s **", GetPlayerNameEx(playerid), params); }
SendFamilyMessage(PlayerInfo[playerid][pMember], TEAM_AZTECAS_COLOR, string);
}
else if(member==10)
{
if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** (6) SACS Owner %s: %s **", GetPlayerNameEx(playerid), params); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** (5) Shift Supervisor %s: %s **", GetPlayerNameEx(playerid), params); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** (4) Dispatcher %s: %s **", GetPlayerNameEx(playerid), params); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** (3) Cabbie %s: %s **", GetPlayerNameEx(playerid), params); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** (2) Taxi Rookie %s: %s **", GetPlayerNameEx(playerid), params); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** (1) Trainee %s: %s **", GetPlayerNameEx(playerid), params); }
else { format(string, sizeof(string), "** (1) Trainee %s: %s. **", GetPlayerNameEx(playerid), params); }
SendFamilyMessage(PlayerInfo[playerid][pMember], TEAM_AZTECAS_COLOR, string);
}
else if(member==14)
{
if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** (6) Al' Queda Owner %s: %s **", GetPlayerNameEx(playerid), params); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** (5) Al' Queda Supervisor %s: %s **", GetPlayerNameEx(playerid), params); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** (4) Al' Queda Doggy %s: %s **", GetPlayerNameEx(playerid), params); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** (3) Al' Queda %s: %s **", GetPlayerNameEx(playerid), params); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** (2) Al' Queda Rookie %s: %s **", GetPlayerNameEx(playerid), params); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** (1) Al' Queda Trainee %s: %s **", GetPlayerNameEx(playerid), params); }
else { format(string, sizeof(string), "** (1) Al' Queda Trainee %s: %s. **", GetPlayerNameEx(playerid), params); }
SendFamilyMessage(PlayerInfo[playerid][pMember], TEAM_AZTECAS_COLOR, string);
}
else if(PlayerInfo[playerid][pFMember] < 255)
{
if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** (6) %s %s: %s **", FamilyInfo[fam][FamilyRank6], GetPlayerNameEx(playerid), params); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** (5) %s %s: %s **", FamilyInfo[fam][FamilyRank5], GetPlayerNameEx(playerid), params); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** (4) %s %s: %s **", FamilyInfo[fam][FamilyRank4], GetPlayerNameEx(playerid), params); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** (3) %s %s: %s **", FamilyInfo[fam][FamilyRank3], GetPlayerNameEx(playerid), params); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** (2) %s %s: %s **", FamilyInfo[fam][FamilyRank2], GetPlayerNameEx(playerid), params); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** (1) %s %s: %s **", FamilyInfo[fam][FamilyRank1], GetPlayerNameEx(playerid), params); }
else { format(string, sizeof(string), "** (0) %s %s: %s **", FamilyInfo[fam][FamilyRank1], GetPlayerNameEx(playerid), params); }
SendNewFamilyMessage(PlayerInfo[playerid][pFMember], TEAM_AZTECAS_COLOR, string);
}
return 1;
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD2, "You're not a part of a Family!");
return 1;
}
}