Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Hello and welcome to Gergő4961's Party System. This system has been created because the community always helped me out and I want to contribute too.
- Feel free to edit it but don't remove the credits unless you edited the whole thing and it's basically now your own.
- ~ Gergő4961 / DRCharlie on SA:MP Forums
- -----------------------------
- | Basics of the filterscript: |
- -----------------------------
- This is basically a filterscript that lets you play better with your friends. You can form a party/squad(I'll be calling it a party from now on) like in any MMO / Multiplayer game.
- You'll be able to see their health, armor and their location if you press N on your keyboard.
- Commands:
- /createparty - > You create a party and become the leader of said party.
- /invite - > You can invite up to 4 people to your party. Only the party leader can use this command.
- /leaveparty - > You leave the party as a member. The party leader can't use this command.
- /disbandparty - > You disband the party = everyone in your party gets kicked out and you leave too. Only the party leader can use this command.
- /kickparty - > You can kick people from your party. Only the party leader can use this command.
- */
- #define FILTERSCRIPT
- #include <a_samp>
- #include <zcmd>
- #include <sscanf2>
- #define MAX_PARTIES 80
- #if defined FILTERSCRIPT
- new PlayerText:PartyTD[15]= {PlayerText:INVALID_TEXT_DRAW, ...};
- forward RemoveMarkers(playerid); // This is the timer used to remove the blips from the map after ~10 seconds.
- enum pInfo
- {
- pID,
- pLeader[MAX_PLAYER_NAME], // Not really used at the moment, I might update script that's why it's here.
- pMember[6],
- }
- new PartyInfo[MAX_PARTIES][pInfo];
- new InParty[MAX_PLAYERS]; // Checks if the player is in a party or not, returns party ID.
- new PartySpot[MAX_PLAYERS]; // Checks which ,,slot" the player is in the party. 1 is leader(RED), 2 is Green, 3 is Blue, 4 is Yellow and 5 is Purple.
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" SA:MP Party / Squad System by Gergo4961/DRCharlie ");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" SA:MP Party / Squad System by Gergo4961/DRCharlie ");
- print("----------------------------------\n");
- }
- #endif
- public OnGameModeInit()
- {
- ShowPlayerMarkers(1);
- LimitPlayerMarkerRadius(800.0); // You can only see your teammates (after pressing N of course) if they are close to you.
- return 1;
- }
- // Defining Team Colors on map ((Press N (KEY_NO) to see your teammates for 10 seconds))
- #define COLOR_RED 0xff0000FF
- #define COLOR_GREEN 0x0cd802FF
- #define COLOR_BLUE 0x02c8ffFF
- #define COLOR_YELLOW 0xf7d200FF
- #define COLOR_PURPLE 0xd300a5FF
- // Defining System Colors ((These are the colors of the messages the server sends you))
- #define COLOR_SYSTEM 0xFF6600FF
- #define COLOR_ERROR 0xFF6600FF
- // Removing the players from the map unless they are members of your party
- #define COLOR_INVISIBLE 0xFFFFFF00
- // This stops you from Spamming N ((Revealing your teammates' location))
- new CheckLocation[MAX_PLAYERS];
- public OnPlayerConnect(playerid)
- {
- InParty[playerid]=-1;
- CheckLocation[playerid]=0;
- PartySpot[playerid]=0;
- LoadPartyTextDraws(playerid);
- SetPlayerColor(playerid,COLOR_INVISIBLE); // It won't show you on the map for others
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- if(InParty[playerid]!=-1) // If the player is in a party and he leaves/crashes/gets kicked or banned this will automatically remove him from the party and sync it for the others.
- {
- if(PartySpot[playerid]==1)
- {
- if(PartyInfo[InParty[playerid]][pMember][2]!=-1)
- {
- PartySpot[PartyInfo[InParty[playerid]][pMember][2]]=0;
- InParty[PartyInfo[InParty[playerid]][pMember][2]]=-1;
- for(new i =0;i<15;i++)
- {
- PlayerTextDrawHide(PartyInfo[InParty[playerid]][pMember][2],PartyTD[i]);
- }
- }
- if(PartyInfo[InParty[playerid]][pMember][3]!=-1)
- {
- PartySpot[PartyInfo[InParty[playerid]][pMember][3]]=0;
- InParty[PartyInfo[InParty[playerid]][pMember][3]]=-1;
- for(new i =0;i<15;i++)
- {
- PlayerTextDrawHide(PartyInfo[InParty[playerid]][pMember][3],PartyTD[i]);
- }
- }
- if(PartyInfo[InParty[playerid]][pMember][4]!=-1)
- {
- PartySpot[PartyInfo[InParty[playerid]][pMember][4]]=0;
- InParty[PartyInfo[InParty[playerid]][pMember][4]]=-1;
- for(new i =0;i<15;i++)
- {
- PlayerTextDrawHide(PartyInfo[InParty[playerid]][pMember][4],PartyTD[i]);
- }
- }
- if(PartyInfo[InParty[playerid]][pMember][5]!=-1)
- {
- PartySpot[PartyInfo[InParty[playerid]][pMember][5]]=0;
- InParty[PartyInfo[InParty[playerid]][pMember][5]]=-1;
- for(new i =0;i<15;i++)
- {
- PlayerTextDrawHide(PartyInfo[InParty[playerid]][pMember][5],PartyTD[i]);
- }
- }
- PartyInfo[InParty[playerid]][pMember][1]=-1;
- PartyInfo[InParty[playerid]][pMember][2]=-1;
- PartyInfo[InParty[playerid]][pMember][3]=-1;
- PartyInfo[InParty[playerid]][pMember][4]=-1;
- PartyInfo[InParty[playerid]][pMember][5]=-1;
- PartyInfo[InParty[playerid]][pID]=0;
- InParty[playerid]=-1;
- PartySpot[playerid]=0;
- for(new i =0;i<15;i++)
- {
- PlayerTextDrawHide(playerid,PartyTD[i]);
- }
- return 1;
- }
- else
- {
- PartyInfo[InParty[playerid]][pMember][PartySpot[playerid]]=-1;
- if(PartyInfo[InParty[playerid]][pMember][1]!=-1)
- {
- HideParty(PartyInfo[InParty[playerid]][pMember][1]);
- }
- if(PartyInfo[InParty[playerid]][pMember][2]!=-1)
- {
- HideParty(PartyInfo[InParty[playerid]][pMember][2]);
- }
- if(PartyInfo[InParty[playerid]][pMember][3]!=-1)
- {
- HideParty(PartyInfo[InParty[playerid]][pMember][3]);
- }
- if(PartyInfo[InParty[playerid]][pMember][4]!=-1)
- {
- HideParty(PartyInfo[InParty[playerid]][pMember][4]);
- }
- if(PartyInfo[InParty[playerid]][pMember][5]!=-1)
- {
- HideParty(PartyInfo[InParty[playerid]][pMember][5]);
- }
- }
- InParty[playerid]=-1;
- PartySpot[playerid]=0;
- for(new i =0;i<15;i++)
- {
- PlayerTextDrawHide(playerid,PartyTD[i]);
- }
- }
- return 1;
- }
- CMD:partyhelp(playerid,params[])
- {
- SendClientMessage(playerid, COLOR_SYSTEM,"Party/Squad system by Gergo4961/DRCharlie(on SA:MP forums)");
- SendClientMessage(playerid, COLOR_SYSTEM,"CMDS: /createparty | /invite | /leaveparty | /disbandparty | /kickparty");
- SendClientMessage(playerid, COLOR_SYSTEM,"Press N To see other party members on your radar");
- return 1;
- }
- CMD:createparty(playerid, params[])
- {
- if(InParty[playerid]==-1)
- {
- new NewID = GetPartyID();
- PartyInfo[NewID][pLeader] = playerid;
- InParty[playerid]=NewID;
- PartySpot[playerid]=1; // party leader
- PartyInfo[NewID][pMember][1]=playerid; // red
- PartyInfo[NewID][pMember][2]=-1; // green
- PartyInfo[NewID][pMember][3]=-1; // blue
- PartyInfo[NewID][pMember][4]=-1; // yellow
- PartyInfo[NewID][pMember][5]=-1; // purple
- PartyInfo[NewID][pID]=NewID;
- new string[256];
- format(string,255,"You've successfully created a party, you can invite your friends using: /invite | Party ID: %d",NewID);
- SendClientMessage(playerid, COLOR_SYSTEM, string);
- }
- else
- {
- SendClientMessage(playerid, COLOR_ERROR, "You're already in a party!");
- }
- return 1;
- }
- CMD:kickparty(playerid, params[])
- {
- new targetid;
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_SYSTEM, "[USAGE]: /kickparty [Part of Name/Player ID]");
- if(InParty[playerid]==-1) return SendClientMessage(playerid, COLOR_ERROR, "You must form a party first! Use: /createparty.");
- if(PartySpot[playerid]==1)
- {
- if(InParty[playerid]==InParty[targetid])
- {
- if(playerid!=targetid)
- {
- PartyInfo[InParty[targetid]][pMember][PartySpot[targetid]]=-1;
- if(PartyInfo[InParty[playerid]][pMember][1]!=-1)
- {
- HideParty(PartyInfo[InParty[playerid]][pMember][1]);
- }
- if(PartyInfo[InParty[playerid]][pMember][2]!=-1)
- {
- HideParty(PartyInfo[InParty[playerid]][pMember][2]);
- }
- if(PartyInfo[InParty[playerid]][pMember][3]!=-1)
- {
- HideParty(PartyInfo[InParty[playerid]][pMember][3]);
- }
- if(PartyInfo[InParty[playerid]][pMember][4]!=-1)
- {
- HideParty(PartyInfo[InParty[playerid]][pMember][4]);
- }
- if(PartyInfo[InParty[playerid]][pMember][5]!=-1)
- {
- HideParty(PartyInfo[InParty[playerid]][pMember][5]);
- }
- InParty[targetid]=-1;
- PartySpot[targetid]=0;
- SendClientMessage(playerid, COLOR_SYSTEM, "You've successfully kicked the given person from your party.");
- SendClientMessage(targetid, COLOR_SYSTEM, "You've been kicked from your current party.");
- for(new i =0;i<15;i++)
- {
- PlayerTextDrawHide(targetid,PartyTD[i]);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_SYSTEM, "You can't kick yourself from the party, that's just stupid. Use: /disbandparty.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_SYSTEM, "You can only kick people from your party, nice try though!");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_ERROR, "Only the leader of the party can use this command!");
- }
- return 1;
- }
- CMD:invite(playerid, params[])
- {
- new targetid;
- if(PartySpot[playerid]==1)
- {
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_SYSTEM, "[USAGE]: /invite [playerid]");
- if(InParty[targetid]==-1)
- {
- for(new i =2;i<6;i++) /// 1 is leader that's why it is not included in the loop
- {
- if(PartyInfo[InParty[playerid]][pMember][i]==-1)
- {
- InParty[targetid]=InParty[playerid];
- PartyInfo[InParty[targetid]][pMember][i]=targetid;
- PartySpot[targetid]=i;
- break;
- }
- }
- if(PartyInfo[InParty[playerid]][pMember][1]!=-1)
- {
- UpdateParty(PartyInfo[InParty[targetid]][pMember][1]);
- }
- if(PartyInfo[InParty[playerid]][pMember][2]!=-1)
- {
- UpdateParty(PartyInfo[InParty[targetid]][pMember][2]);
- }
- if(PartyInfo[InParty[playerid]][pMember][3]!=-1)
- {
- UpdateParty(PartyInfo[InParty[targetid]][pMember][3]);
- }
- if(PartyInfo[InParty[playerid]][pMember][4]!=-1)
- {
- UpdateParty(PartyInfo[InParty[targetid]][pMember][4]);
- }
- if(PartyInfo[InParty[playerid]][pMember][5]!=-1)
- {
- UpdateParty(PartyInfo[InParty[targetid]][pMember][5]);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_ERROR, "The selected player is already in a party.");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_ERROR, "You must create a party first: /createparty.");
- return 1;
- }
- return 1;
- }
- CMD:leaveparty(playerid,params[])
- {
- if(InParty[playerid]!=-1)
- {
- if(PartySpot[playerid]!=1)
- {
- PartyInfo[InParty[playerid]][pMember][PartySpot[playerid]]=-1;
- if(PartyInfo[InParty[playerid]][pMember][1]!=-1)
- {
- HideParty(PartyInfo[InParty[playerid]][pMember][1]);
- }
- if(PartyInfo[InParty[playerid]][pMember][2]!=-1)
- {
- HideParty(PartyInfo[InParty[playerid]][pMember][2]);
- }
- if(PartyInfo[InParty[playerid]][pMember][3]!=-1)
- {
- HideParty(PartyInfo[InParty[playerid]][pMember][3]);
- }
- if(PartyInfo[InParty[playerid]][pMember][4]!=-1)
- {
- HideParty(PartyInfo[InParty[playerid]][pMember][4]);
- }
- if(PartyInfo[InParty[playerid]][pMember][5]!=-1)
- {
- HideParty(PartyInfo[InParty[playerid]][pMember][5]);
- }
- InParty[playerid]=-1;
- PartySpot[playerid]=0;
- for(new i =0;i<15;i++)
- {
- PlayerTextDrawHide(playerid,PartyTD[i]);
- }
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_ERROR, "Only members can use this command, use /disbandparty.");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_ERROR, "You are not in a party.");
- return 1;
- }
- }
- CMD:disbandparty(playerid,params[])
- {
- if(InParty[playerid]!=-1)
- {
- if(PartySpot[playerid]==1)
- {
- if(PartyInfo[InParty[playerid]][pMember][2]!=-1)
- {
- PartySpot[PartyInfo[InParty[playerid]][pMember][2]]=0;
- InParty[PartyInfo[InParty[playerid]][pMember][2]]=-1;
- for(new i =0;i<15;i++)
- {
- PlayerTextDrawHide(PartyInfo[InParty[playerid]][pMember][2],PartyTD[i]);
- }
- }
- if(PartyInfo[InParty[playerid]][pMember][3]!=-1)
- {
- PartySpot[PartyInfo[InParty[playerid]][pMember][3]]=0;
- InParty[PartyInfo[InParty[playerid]][pMember][3]]=-1;
- for(new i =0;i<15;i++)
- {
- PlayerTextDrawHide(PartyInfo[InParty[playerid]][pMember][3],PartyTD[i]);
- }
- }
- if(PartyInfo[InParty[playerid]][pMember][4]!=-1)
- {
- PartySpot[PartyInfo[InParty[playerid]][pMember][4]]=0;
- InParty[PartyInfo[InParty[playerid]][pMember][4]]=-1;
- for(new i =0;i<15;i++)
- {
- PlayerTextDrawHide(PartyInfo[InParty[playerid]][pMember][4],PartyTD[i]);
- }
- }
- if(PartyInfo[InParty[playerid]][pMember][5]!=-1)
- {
- PartySpot[PartyInfo[InParty[playerid]][pMember][5]]=0;
- InParty[PartyInfo[InParty[playerid]][pMember][5]]=-1;
- for(new i =0;i<15;i++)
- {
- PlayerTextDrawHide(PartyInfo[InParty[playerid]][pMember][5],PartyTD[i]);
- }
- }
- PartyInfo[InParty[playerid]][pMember][1]=-1;
- PartyInfo[InParty[playerid]][pMember][2]=-1;
- PartyInfo[InParty[playerid]][pMember][3]=-1;
- PartyInfo[InParty[playerid]][pMember][4]=-1;
- PartyInfo[InParty[playerid]][pMember][5]=-1;
- PartyInfo[InParty[playerid]][pID]=0;
- new string[256];
- format(string,255,"Disbanded party: %d",InParty[playerid]);
- SendClientMessage(playerid, COLOR_SYSTEM, string);
- InParty[playerid]=-1;
- PartySpot[playerid]=0;
- for(new i =0;i<15;i++)
- {
- PlayerTextDrawHide(playerid,PartyTD[i]);
- }
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_ERROR, "Only the party leader can use this command, use /leaveparty.");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_ERROR, "You are not in a party.");
- return 1;
- }
- }
- public RemoveMarkers(playerid) // Removing the dots on the radar after ~10 seconds.
- {
- for(new i =0;i<MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- SetPlayerMarkerForPlayer(playerid, i, COLOR_INVISIBLE);
- }
- }
- CheckLocation[playerid]=0;
- }
- public OnPlayerDeath(playerid,killerid,reason)
- {
- }
- stock ShowMarkers(playerid) // After pressing N this function reveals your teammates on your radar.
- {
- if(PartyInfo[InParty[playerid]][pMember][1]!=-1&&PartyInfo[InParty[playerid]][pMember][1]!=playerid)
- {
- SetPlayerMarkerForPlayer(playerid, PartyInfo[InParty[playerid]][pMember][1], COLOR_RED);
- }
- if(PartyInfo[InParty[playerid]][pMember][2]!=-1&&PartyInfo[InParty[playerid]][pMember][2]!=playerid)
- {
- SetPlayerMarkerForPlayer(playerid,PartyInfo[InParty[playerid]][pMember][2],COLOR_GREEN);
- }
- if(PartyInfo[InParty[playerid]][pMember][3]!=-1&&PartyInfo[InParty[playerid]][pMember][3]!=playerid)
- {
- SetPlayerMarkerForPlayer(playerid, PartyInfo[InParty[playerid]][pMember][3], COLOR_BLUE);
- }
- if(PartyInfo[InParty[playerid]][pMember][4]!=-1&&PartyInfo[InParty[playerid]][pMember][4]!=playerid)
- {
- SetPlayerMarkerForPlayer(playerid, PartyInfo[InParty[playerid]][pMember][4], COLOR_YELLOW);
- }
- if(PartyInfo[InParty[playerid]][pMember][5]!=-1&&PartyInfo[InParty[playerid]][pMember][5]!=playerid)
- {
- SetPlayerMarkerForPlayer(playerid, PartyInfo[InParty[playerid]][pMember][5], COLOR_PURPLE);
- }
- }
- stock UpdateParty(playerid) // This updates all the information of your teammates which is their HP and Armor.
- {
- if(InParty[playerid]!=-1)
- {
- new Float:h1,Float:h2,Float:h3,Float:h4,Float:h5;
- new stringh1[255],stringh2[255],stringh3[255],stringh4[255],stringh5[255];
- new Float:a1,Float:a2,Float:a3,Float:a4,Float:a5;
- new stringa1[255],stringa2[255],stringa3[255],stringa4[255],stringa5[255];
- if(PartyInfo[InParty[playerid]][pMember][1]!=-1)
- {
- PlayerTextDrawSetString(playerid,PartyTD[0],GetName(PartyInfo[InParty[playerid]][pMember][1]));
- PlayerTextDrawShow(playerid,PartyTD[0]);
- GetPlayerHealth(PartyInfo[InParty[playerid]][pMember][1],h1); format(stringh1,255,"%.0f",h1);
- PlayerTextDrawSetString(playerid,PartyTD[1],stringh1); PlayerTextDrawShow(playerid,PartyTD[1]);
- GetPlayerArmour(PartyInfo[InParty[playerid]][pMember][1],a1); format(stringa1,255,"%.0f",a1);
- PlayerTextDrawSetString(playerid,PartyTD[2],stringa1); PlayerTextDrawShow(playerid,PartyTD[2]);
- }
- if(PartyInfo[InParty[playerid]][pMember][2]!=-1)
- {
- PlayerTextDrawSetString(playerid,PartyTD[3],GetName(PartyInfo[InParty[playerid]][pMember][2]));
- PlayerTextDrawShow(playerid,PartyTD[3]);
- GetPlayerHealth(PartyInfo[InParty[playerid]][pMember][2],h2);format(stringh2,255,"%.0f",h2);
- PlayerTextDrawSetString(playerid,PartyTD[4],stringh2); PlayerTextDrawShow(playerid,PartyTD[4]);
- GetPlayerArmour(PartyInfo[InParty[playerid]][pMember][2],a2); format(stringa2,255,"%.0f",a2);
- PlayerTextDrawSetString(playerid,PartyTD[5],stringa2); PlayerTextDrawShow(playerid,PartyTD[5]);
- }
- if(PartyInfo[InParty[playerid]][pMember][3]!=-1)
- {
- PlayerTextDrawSetString(playerid,PartyTD[6],GetName(PartyInfo[InParty[playerid]][pMember][3]));
- PlayerTextDrawShow(playerid,PartyTD[6]);
- GetPlayerHealth(PartyInfo[InParty[playerid]][pMember][3],h3); format(stringh3,255,"%.0f",h3);
- PlayerTextDrawSetString(playerid,PartyTD[7],stringh3); PlayerTextDrawShow(playerid,PartyTD[7]);
- GetPlayerArmour(PartyInfo[InParty[playerid]][pMember][3],a3); format(stringa3,255,"%.0f",a3);
- PlayerTextDrawSetString(playerid,PartyTD[8],stringa3); PlayerTextDrawShow(playerid,PartyTD[8]);
- }
- if(PartyInfo[InParty[playerid]][pMember][4]!=-1)
- {
- PlayerTextDrawSetString(playerid,PartyTD[9],GetName(PartyInfo[InParty[playerid]][pMember][4]));
- PlayerTextDrawShow(playerid,PartyTD[9]);
- GetPlayerHealth(PartyInfo[InParty[playerid]][pMember][4],h4); format(stringh4,255,"%.0f",h4);
- PlayerTextDrawSetString(playerid,PartyTD[10],stringh4); PlayerTextDrawShow(playerid,PartyTD[10]);
- GetPlayerArmour(PartyInfo[InParty[playerid]][pMember][4],a4); format(stringa4,255,"%.0f",a4);
- PlayerTextDrawSetString(playerid,PartyTD[11],stringa4); PlayerTextDrawShow(playerid,PartyTD[11]);
- }
- if(PartyInfo[InParty[playerid]][pMember][5]!=-1)
- {
- PlayerTextDrawSetString(playerid,PartyTD[12],GetName(PartyInfo[InParty[playerid]][pMember][5]));
- PlayerTextDrawShow(playerid,PartyTD[12]);
- GetPlayerHealth(PartyInfo[InParty[playerid]][pMember][5],h5); format(stringh5,255,"%.0f",h5);
- PlayerTextDrawSetString(playerid,PartyTD[13],stringh5); PlayerTextDrawShow(playerid,PartyTD[13]);
- GetPlayerArmour(PartyInfo[InParty[playerid]][pMember][5],a5); format(stringa5,255,"%.0f",a5);
- PlayerTextDrawSetString(playerid,PartyTD[14],stringa5); PlayerTextDrawShow(playerid,PartyTD[14]);
- }
- }
- }
- stock HideParty(playerid) // Updates the party information, removes party members if they left the party.
- {
- if(InParty[playerid]!=-1)
- {
- if(PartyInfo[InParty[playerid]][pMember][1]==-1)
- {
- PlayerTextDrawHide(playerid,PartyTD[0]);
- PlayerTextDrawHide(playerid,PartyTD[1]);
- PlayerTextDrawHide(playerid,PartyTD[2]);
- }
- if(PartyInfo[InParty[playerid]][pMember][2]==-1)
- {
- PlayerTextDrawHide(playerid,PartyTD[3]);
- PlayerTextDrawHide(playerid,PartyTD[4]);
- PlayerTextDrawHide(playerid,PartyTD[5]);
- }
- if(PartyInfo[InParty[playerid]][pMember][3]==-1)
- {
- PlayerTextDrawHide(playerid,PartyTD[6]);
- PlayerTextDrawHide(playerid,PartyTD[7]);
- PlayerTextDrawHide(playerid,PartyTD[8]);
- }
- if(PartyInfo[InParty[playerid]][pMember][4]==-1)
- {
- PlayerTextDrawHide(playerid,PartyTD[9]);
- PlayerTextDrawHide(playerid,PartyTD[10]);
- PlayerTextDrawHide(playerid,PartyTD[11]);
- }
- if(PartyInfo[InParty[playerid]][pMember][5]==-1)
- {
- PlayerTextDrawHide(playerid,PartyTD[12]);
- PlayerTextDrawHide(playerid,PartyTD[13]);
- PlayerTextDrawHide(playerid,PartyTD[14]);
- }
- }
- else
- {
- PlayerTextDrawHide(playerid,PartyTD[0]);
- PlayerTextDrawHide(playerid,PartyTD[1]);
- PlayerTextDrawHide(playerid,PartyTD[2]);
- PlayerTextDrawHide(playerid,PartyTD[3]);
- PlayerTextDrawHide(playerid,PartyTD[4]);
- PlayerTextDrawHide(playerid,PartyTD[5]);
- PlayerTextDrawHide(playerid,PartyTD[6]);
- PlayerTextDrawHide(playerid,PartyTD[7]);
- PlayerTextDrawHide(playerid,PartyTD[8]);
- PlayerTextDrawHide(playerid,PartyTD[9]);
- PlayerTextDrawHide(playerid,PartyTD[10]);
- PlayerTextDrawHide(playerid,PartyTD[11]);
- PlayerTextDrawHide(playerid,PartyTD[12]);
- PlayerTextDrawHide(playerid,PartyTD[13]);
- PlayerTextDrawHide(playerid,PartyTD[14]);
- }
- }
- stock GetName(playerid)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- return name;
- }
- stock GetPartyID() // Calculates the newly created party's ID so it doesn't overwrite a previous one.
- {
- new i=1;
- while(i != MAX_PARTIES) {
- if(PartyInfo[i][pID] == 0) {
- return i;
- }
- i++;
- }
- return -1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(newkeys == KEY_NO) // ,,N" Button, shows your teammates for a few seconds.
- {
- if(InParty[playerid]!=-1)
- {
- if(CheckLocation[playerid]==0) // This variable is created so you can't spam N.
- {
- ShowMarkers(playerid);
- SetTimerEx("RemoveMarkers",10000,0,"i",playerid); // Shows your teammates for 10 seconds, it bugs out if you show them all the time.
- CheckLocation[playerid]=1;
- }
- }
- }
- }
- public OnPlayerUpdate(playerid)
- {
- UpdateParty(playerid); // Updates party information frequently.
- return 1;
- }
- stock LoadPartyTextDraws(playerid)
- {
- /*
- COLOR RED
- */
- PartyTD[0] = CreatePlayerTextDraw(playerid,566.000000, 298.000000, "Charlie_Test_Cortez");
- PlayerTextDrawBackgroundColor(playerid,PartyTD[0], 255);
- PlayerTextDrawFont(playerid,PartyTD[0], 1);
- PlayerTextDrawLetterSize(playerid,PartyTD[0], 0.210000, 1.100000);
- PlayerTextDrawColor(playerid,PartyTD[0], -16119041);
- PlayerTextDrawSetOutline(playerid,PartyTD[0], 0);
- PlayerTextDrawSetProportional(playerid,PartyTD[0], 1);
- PlayerTextDrawSetShadow(playerid,PartyTD[0], 1);
- PlayerTextDrawUseBox(playerid,PartyTD[0], 1);
- PlayerTextDrawBoxColor(playerid,PartyTD[0], 255);
- PlayerTextDrawTextSize(playerid,PartyTD[0], 632.000000, 0.000000);
- PlayerTextDrawSetSelectable(playerid,PartyTD[0], 0);
- PartyTD[1] = CreatePlayerTextDraw(playerid,590.000000, 311.000000, "100");
- PlayerTextDrawAlignment(playerid,PartyTD[1], 2);
- PlayerTextDrawBackgroundColor(playerid,PartyTD[1], 255);
- PlayerTextDrawFont(playerid,PartyTD[1], 3);
- PlayerTextDrawLetterSize(playerid,PartyTD[1], 0.210000, 1.100000);
- PlayerTextDrawColor(playerid,PartyTD[1], -922746625);
- PlayerTextDrawSetOutline(playerid,PartyTD[1], 0);
- PlayerTextDrawSetProportional(playerid,PartyTD[1], 1);
- PlayerTextDrawSetShadow(playerid,PartyTD[1], 1);
- PlayerTextDrawUseBox(playerid,PartyTD[1], 1);
- PlayerTextDrawBoxColor(playerid,PartyTD[1], 909522582);
- PlayerTextDrawTextSize(playerid,PartyTD[1], 684.000000, 15.000000);
- PlayerTextDrawSetSelectable(playerid,PartyTD[1], 0);
- PartyTD[2] = CreatePlayerTextDraw(playerid,608.000000, 311.000000, "100");
- PlayerTextDrawAlignment(playerid,PartyTD[2], 2);
- PlayerTextDrawBackgroundColor(playerid,PartyTD[2], 255);
- PlayerTextDrawFont(playerid,PartyTD[2], 3);
- PlayerTextDrawLetterSize(playerid,PartyTD[2], 0.210000, 1.100000);
- PlayerTextDrawColor(playerid,PartyTD[2], 1116732671);
- PlayerTextDrawSetOutline(playerid,PartyTD[2], 0);
- PlayerTextDrawSetProportional(playerid,PartyTD[2], 1);
- PlayerTextDrawSetShadow(playerid,PartyTD[2], 1);
- PlayerTextDrawUseBox(playerid,PartyTD[2], 1);
- PlayerTextDrawBoxColor(playerid,PartyTD[2], 909522582);
- PlayerTextDrawTextSize(playerid,PartyTD[2], 684.000000, 15.000000);
- PlayerTextDrawSetSelectable(playerid,PartyTD[2], 0);
- /*
- COLOR GREEN
- */
- PartyTD[3] = CreatePlayerTextDraw(playerid,566.000000, 328.000000, "Charlie_Test_Cortez");
- PlayerTextDrawBackgroundColor(playerid,PartyTD[3], 255);
- PlayerTextDrawFont(playerid,PartyTD[3], 1);
- PlayerTextDrawLetterSize(playerid,PartyTD[3], 0.210000, 1.100000);
- PlayerTextDrawColor(playerid,PartyTD[3], 33500415);
- PlayerTextDrawSetOutline(playerid,PartyTD[3], 0);
- PlayerTextDrawSetProportional(playerid,PartyTD[3], 1);
- PlayerTextDrawSetShadow(playerid,PartyTD[3], 1);
- PlayerTextDrawUseBox(playerid,PartyTD[3], 1);
- PlayerTextDrawBoxColor(playerid,PartyTD[3], 255);
- PlayerTextDrawTextSize(playerid,PartyTD[3], 632.000000, 0.000000);
- PlayerTextDrawSetSelectable(playerid,PartyTD[3], 0);
- PartyTD[4] = CreatePlayerTextDraw(playerid,590.000000, 341.000000, "100");
- PlayerTextDrawAlignment(playerid,PartyTD[4], 2);
- PlayerTextDrawBackgroundColor(playerid,PartyTD[4], 255);
- PlayerTextDrawFont(playerid,PartyTD[4], 3);
- PlayerTextDrawLetterSize(playerid,PartyTD[4], 0.210000, 1.100000);
- PlayerTextDrawColor(playerid,PartyTD[4], -922746625);
- PlayerTextDrawSetOutline(playerid,PartyTD[4], 0);
- PlayerTextDrawSetProportional(playerid,PartyTD[4], 1);
- PlayerTextDrawSetShadow(playerid,PartyTD[4], 1);
- PlayerTextDrawUseBox(playerid,PartyTD[4], 1);
- PlayerTextDrawBoxColor(playerid,PartyTD[4], 909522582);
- PlayerTextDrawTextSize(playerid,PartyTD[4], 684.000000, 15.000000);
- PlayerTextDrawSetSelectable(playerid,PartyTD[4], 0);
- PartyTD[5] = CreatePlayerTextDraw(playerid,608.000000, 341.000000, "100");
- PlayerTextDrawAlignment(playerid,PartyTD[5], 2);
- PlayerTextDrawBackgroundColor(playerid,PartyTD[5], 255);
- PlayerTextDrawFont(playerid,PartyTD[5], 3);
- PlayerTextDrawLetterSize(playerid,PartyTD[5], 0.210000, 1.100000);
- PlayerTextDrawColor(playerid,PartyTD[5], 1116732671);
- PlayerTextDrawSetOutline(playerid,PartyTD[5], 0);
- PlayerTextDrawSetProportional(playerid,PartyTD[5], 1);
- PlayerTextDrawSetShadow(playerid,PartyTD[5], 1);
- PlayerTextDrawUseBox(playerid,PartyTD[5], 1);
- PlayerTextDrawBoxColor(playerid,PartyTD[5], 909522582);
- PlayerTextDrawTextSize(playerid,PartyTD[5], 684.000000, 15.000000);
- PlayerTextDrawSetSelectable(playerid,PartyTD[5], 0);
- /*
- COLOR BLUE
- */
- PartyTD[6] = CreatePlayerTextDraw(playerid,566.000000, 358.000000, "Charlie_Test_Cortez");
- PlayerTextDrawBackgroundColor(playerid,PartyTD[6], 255);
- PlayerTextDrawFont(playerid,PartyTD[6], 1);
- PlayerTextDrawLetterSize(playerid,PartyTD[6], 0.210000, 1.100000);
- PlayerTextDrawColor(playerid,PartyTD[6], 867106815);
- PlayerTextDrawSetOutline(playerid,PartyTD[6], 0);
- PlayerTextDrawSetProportional(playerid,PartyTD[6], 1);
- PlayerTextDrawSetShadow(playerid,PartyTD[6], 1);
- PlayerTextDrawUseBox(playerid,PartyTD[6], 1);
- PlayerTextDrawBoxColor(playerid,PartyTD[6], 255);
- PlayerTextDrawTextSize(playerid,PartyTD[6], 632.000000, 0.000000);
- PlayerTextDrawSetSelectable(playerid,PartyTD[6], 0);
- PartyTD[7] = CreatePlayerTextDraw(playerid,590.000000, 371.000000, "100");
- PlayerTextDrawAlignment(playerid,PartyTD[7], 2);
- PlayerTextDrawBackgroundColor(playerid,PartyTD[7], 255);
- PlayerTextDrawFont(playerid,PartyTD[7], 3);
- PlayerTextDrawLetterSize(playerid,PartyTD[7], 0.210000, 1.100000);
- PlayerTextDrawColor(playerid,PartyTD[7], -922746625);
- PlayerTextDrawSetOutline(playerid,PartyTD[7], 0);
- PlayerTextDrawSetProportional(playerid,PartyTD[7], 1);
- PlayerTextDrawSetShadow(playerid,PartyTD[7], 1);
- PlayerTextDrawUseBox(playerid,PartyTD[7], 1);
- PlayerTextDrawBoxColor(playerid,PartyTD[7], 909522582);
- PlayerTextDrawTextSize(playerid,PartyTD[7], 684.000000, 15.000000);
- PlayerTextDrawSetSelectable(playerid,PartyTD[7], 0);
- PartyTD[8] = CreatePlayerTextDraw(playerid,608.000000, 371.000000, "100");
- PlayerTextDrawAlignment(playerid,PartyTD[8], 2);
- PlayerTextDrawBackgroundColor(playerid,PartyTD[8], 255);
- PlayerTextDrawFont(playerid,PartyTD[8], 3);
- PlayerTextDrawLetterSize(playerid,PartyTD[8], 0.210000, 1.100000);
- PlayerTextDrawColor(playerid,PartyTD[8], 1116732671);
- PlayerTextDrawSetOutline(playerid,PartyTD[8], 0);
- PlayerTextDrawSetProportional(playerid,PartyTD[8], 1);
- PlayerTextDrawSetShadow(playerid,PartyTD[8], 1);
- PlayerTextDrawUseBox(playerid,PartyTD[8], 1);
- PlayerTextDrawBoxColor(playerid,PartyTD[8], 909522582);
- PlayerTextDrawTextSize(playerid,PartyTD[8], 684.000000, 15.000000);
- PlayerTextDrawSetSelectable(playerid,PartyTD[8], 0);
- /*
- COLOR YELLOW
- */
- PartyTD[9] = CreatePlayerTextDraw(playerid,566.000000, 388.000000, "Charlie_Test_Cortez");
- PlayerTextDrawBackgroundColor(playerid,PartyTD[9], 255);
- PlayerTextDrawFont(playerid,PartyTD[9], 1);
- PlayerTextDrawLetterSize(playerid,PartyTD[9], 0.210000, 1.100000);
- PlayerTextDrawColor(playerid,PartyTD[9], -151060225);
- PlayerTextDrawSetOutline(playerid,PartyTD[9], 0);
- PlayerTextDrawSetProportional(playerid,PartyTD[9], 1);
- PlayerTextDrawSetShadow(playerid,PartyTD[9], 1);
- PlayerTextDrawUseBox(playerid,PartyTD[9], 1);
- PlayerTextDrawBoxColor(playerid,PartyTD[9], 255);
- PlayerTextDrawTextSize(playerid,PartyTD[9], 632.000000, 0.000000);
- PlayerTextDrawSetSelectable(playerid,PartyTD[9], 0);
- PartyTD[10] = CreatePlayerTextDraw(playerid,590.000000, 401.000000, "100");
- PlayerTextDrawAlignment(playerid,PartyTD[10], 2);
- PlayerTextDrawBackgroundColor(playerid,PartyTD[10], 255);
- PlayerTextDrawFont(playerid,PartyTD[10], 3);
- PlayerTextDrawLetterSize(playerid,PartyTD[10], 0.210000, 1.100000);
- PlayerTextDrawColor(playerid,PartyTD[10], -922746625);
- PlayerTextDrawSetOutline(playerid,PartyTD[10], 0);
- PlayerTextDrawSetProportional(playerid,PartyTD[10], 1);
- PlayerTextDrawSetShadow(playerid,PartyTD[10], 1);
- PlayerTextDrawUseBox(playerid,PartyTD[10], 1);
- PlayerTextDrawBoxColor(playerid,PartyTD[10], 909522582);
- PlayerTextDrawTextSize(playerid,PartyTD[10], 684.000000, 15.000000);
- PlayerTextDrawSetSelectable(playerid,PartyTD[10], 0);
- PartyTD[11] = CreatePlayerTextDraw(playerid,608.000000, 401.000000, "100");
- PlayerTextDrawAlignment(playerid,PartyTD[11], 2);
- PlayerTextDrawBackgroundColor(playerid,PartyTD[11], 255);
- PlayerTextDrawFont(playerid,PartyTD[11], 3);
- PlayerTextDrawLetterSize(playerid,PartyTD[11], 0.210000, 1.100000);
- PlayerTextDrawColor(playerid,PartyTD[11], 1116732671);
- PlayerTextDrawSetOutline(playerid,PartyTD[11], 0);
- PlayerTextDrawSetProportional(playerid,PartyTD[11], 1);
- PlayerTextDrawSetShadow(playerid,PartyTD[11], 1);
- PlayerTextDrawUseBox(playerid,PartyTD[11], 1);
- PlayerTextDrawBoxColor(playerid,PartyTD[11], 909522582);
- PlayerTextDrawTextSize(playerid,PartyTD[11], 684.000000, 15.000000);
- PlayerTextDrawSetSelectable(playerid,PartyTD[11], 0);
- /*
- COLOR PURPLE
- */
- PartyTD[12] = CreatePlayerTextDraw(playerid,566.000000, 418.000000, "Charlie_Test_Cortez");
- PlayerTextDrawBackgroundColor(playerid,PartyTD[12], 255);
- PlayerTextDrawFont(playerid,PartyTD[12], 1);
- PlayerTextDrawLetterSize(playerid,PartyTD[12], 0.210000, 1.100000);
- PlayerTextDrawColor(playerid,PartyTD[12], -16711681);
- PlayerTextDrawSetOutline(playerid,PartyTD[12], 0);
- PlayerTextDrawSetProportional(playerid,PartyTD[12], 1);
- PlayerTextDrawSetShadow(playerid,PartyTD[12], 1);
- PlayerTextDrawUseBox(playerid,PartyTD[12], 1);
- PlayerTextDrawBoxColor(playerid,PartyTD[12], 255);
- PlayerTextDrawTextSize(playerid,PartyTD[12], 632.000000, 0.000000);
- PlayerTextDrawSetSelectable(playerid,PartyTD[12], 0);
- PartyTD[13] = CreatePlayerTextDraw(playerid,590.000000, 431.000000, "100");
- PlayerTextDrawAlignment(playerid,PartyTD[13], 2);
- PlayerTextDrawBackgroundColor(playerid,PartyTD[13], 255);
- PlayerTextDrawFont(playerid,PartyTD[13], 3);
- PlayerTextDrawLetterSize(playerid,PartyTD[13], 0.210000, 1.100000);
- PlayerTextDrawColor(playerid,PartyTD[13], -922746625);
- PlayerTextDrawSetOutline(playerid,PartyTD[13], 0);
- PlayerTextDrawSetProportional(playerid,PartyTD[13], 1);
- PlayerTextDrawSetShadow(playerid,PartyTD[13], 1);
- PlayerTextDrawUseBox(playerid,PartyTD[13], 1);
- PlayerTextDrawBoxColor(playerid,PartyTD[13], 909522582);
- PlayerTextDrawTextSize(playerid,PartyTD[13], 684.000000, 15.000000);
- PlayerTextDrawSetSelectable(playerid,PartyTD[13], 0);
- PartyTD[14] = CreatePlayerTextDraw(playerid,608.000000, 431.000000, "100");
- PlayerTextDrawAlignment(playerid,PartyTD[14], 2);
- PlayerTextDrawBackgroundColor(playerid,PartyTD[14], 255);
- PlayerTextDrawFont(playerid,PartyTD[14], 3);
- PlayerTextDrawLetterSize(playerid,PartyTD[14], 0.210000, 1.100000);
- PlayerTextDrawColor(playerid,PartyTD[14], 1116732671);
- PlayerTextDrawSetOutline(playerid,PartyTD[14], 0);
- PlayerTextDrawSetProportional(playerid,PartyTD[14], 1);
- PlayerTextDrawSetShadow(playerid,PartyTD[14], 1);
- PlayerTextDrawUseBox(playerid,PartyTD[14], 1);
- PlayerTextDrawBoxColor(playerid,PartyTD[14], 909522582);
- PlayerTextDrawTextSize(playerid,PartyTD[14], 684.000000, 15.000000);
- PlayerTextDrawSetSelectable(playerid,PartyTD[14], 0);
- }
- // Created by Gergo4961/DRCharlie on SA-MP Forums
Advertisement
Add Comment
Please, Sign In to add comment