11.05.2016, 07:03
Gamemode: GTARP
How should I make command, when I type /members to show all online and offline members of organization.?
Save enum pLeader and pMember reservis and reserved slot pSlot

My command Invite players:
How should I make command, when I type /members to show all online and offline members of organization.?
Save enum pLeader and pMember reservis and reserved slot pSlot

My command Invite players:
pawn Код:
if(strcmp(cmd, "/invite", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /invite [ID Igraca/Dio Imena]");
return 1;
}
new para1;
new ftext[20];
para1 = ReturnUser(tmp);
if (PlayerInfo[playerid][pLeader] >= 1)
{
if(IsPlayerConnected(para1))
{
if(PlayerInfo[para1][pKazna] == 1) return SCM(playerid,COLOR_WHITE,"Igrac ima Lidersku kaznu");
if(PlayerInfo[para1][pKazna] == 2) return SCM(playerid,COLOR_WHITE,"Igrac ima Adminsku kaznu");
if(PlayerInfo[para1][pLevel] < 3)
{
SendClientMessage(playerid, COLOR_GREY, "[GRESKA] Igrac mora biti minimum level 3! ");
return 1;
}
if(para1 != INVALID_PLAYER_ID)
{
if (gTeam[para1]==TEAM_GREEN && PlayerInfo[para1][pMember] == 0 && PlayerInfo[para1][pFMember] == 255)
{
if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Policija"; ChosenSkin[para1] = 265; SetPlayerSkin(para1, 265); }
else if(PlayerInfo[playerid][pLeader] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "FBI"; ChosenSkin[para1] = 286; SetPlayerSkin(para1, 286); }
else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "BIA"; ChosenSkin[para1] = 164; SetPlayerSkin(para1, 164); }// NOVA ORG
else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Hitna Pomoc"; ChosenSkin[para1] = 274; SetPlayerSkin(para1, 274); }
else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "The Russian Mafia"; ChosenSkin[para1] = 126; SetPlayerSkin(para1, 126); }
else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 6; gTeam[para1] = 6; ftext = "La Cosa Nostra"; ChosenSkin[para1] = 98; SetPlayerSkin(para1, 98); }
else if(PlayerInfo[playerid][pLeader] == 7) { PlayerInfo[para1][pTeam] = 7; gTeam[para1] = 7; ftext = "Vlada"; ChosenSkin[para1] = 61; SetPlayerSkin(para1, 61); }
else if(PlayerInfo[playerid][pLeader] == 8) { PlayerInfo[para1][pTeam] = 8; gTeam[para1] = 8; ftext = "GHS"; ChosenSkin[para1] = 117; SetPlayerSkin(para1, 117); }// NOVA ORG
else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "[BE] Novinari"; ChosenSkin[para1] = 17; SetPlayerSkin(para1, 17); }
else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxi Company"; ChosenSkin[para1] = 182; SetPlayerSkin(para1, 182); }
else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 11; gTeam[para1] = 2; ftext = "Yamaguchi"; ChosenSkin[para1] = 23; SetPlayerSkin(para1, 23); }// NOVA ORG
else if(PlayerInfo[playerid][pLeader] == 12) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Parking Servis"; ChosenSkin[para1] = 16; SetPlayerSkin(para1, 16); }
else if(PlayerInfo[playerid][pLeader] == 13) { PlayerInfo[para1][pTeam] = 13; gTeam[para1] = 12; ftext = "Ballas Family"; ChosenSkin[para1] = 103; SetPlayerSkin(para1, 103); }
else if(PlayerInfo[playerid][pLeader] == 14) { PlayerInfo[para1][pTeam] = 14; gTeam[para1] = 14; ftext = "Los Surenos"; ChosenSkin[para1] = 114; SetPlayerSkin(para1, 114); }// NOVA ORG
else if(PlayerInfo[playerid][pLeader] == 15) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 15; ftext = "MS-13"; ChosenSkin[para1] = 108; SetPlayerSkin(para1, 108); }
else if(PlayerInfo[playerid][pLeader] == 16) { PlayerInfo[para1][pTeam] = 16; gTeam[para1] = 16; ftext = "Grove Street Family"; ChosenSkin[para1] = 105; SetPlayerSkin(para1, 105); }
else if(PlayerInfo[playerid][pLeader] == 17) { PlayerInfo[para1][pTeam] = 17; gTeam[para1] = 17; ftext = "PO 1"; ChosenSkin[para1] = 111; SetPlayerSkin(para1, 111); }
else if(PlayerInfo[playerid][pLeader] == 18) { PlayerInfo[para1][pTeam] = 18; gTeam[para1] = 18; ftext = "Bajkeri"; ChosenSkin[para1] = 247; SetPlayerSkin(para1, 247); }
else if(PlayerInfo[playerid][pLeader] == 19) { PlayerInfo[para1][pTeam] = 19; gTeam[para1] = 19; ftext = "PO 2"; ChosenSkin[para1] = 247; SetPlayerSkin(para1, 247); }
else { return 1; }
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pMember] = PlayerInfo[playerid][pLeader];
PlayerInfo[para1][pRank] = 1;
new stringer[256];
new stringer1[256];
new stringerceo[256];
printf("AdmCmd: %s je pozvao %s-a da se pridruzi %s.", sendername, giveplayer, ftext);
format(stringer, sizeof(stringer), "[INFO] {FFFFFF}Pozvani ste u %s, pozvao vas je Lider %s", ftext, sendername);
//SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(stringer1, sizeof(stringer1), "[INFO] {FFFFFF}Pozvali ste %s-a da se pridruzi %s.", giveplayer,ftext);
format(stringerceo,sizeof(stringerceo),"%s%s%s",stringa,stringaa,stringaar);
ShowPlayerDialog(giveplayerid,SELLTOCAR,DIALOG_STYLE_MSGBOX,"{0099ff}Kupovina Vozila",stringerceo,"Da","Ne");
//SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "[ODBIJENO] Taj igrac ima wanted level ili je u drugoj organizaciji.");
return 1;
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "[GRESKA] Samo Lideri mogu koristiti ovu komandu!");
}
}
return 1;
}