Hey,
Da mir mein jetziges Member system nicht gefällt und ich nicht weiß wie ich es machen kann wie ich es will...
Hier ein beispiel
/members
Anzeige:
Peter Leader
Ute CoLeader
Manfred Rang
Mein jetziger code:
Code
if(strcmp("/members", cmd, true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMember] != -1 || PlayerInfo[playerid][pLeader] != -1)
{
new Team;
if(PlayerInfo[playerid][pLeader] != -1)
{
Team = PlayerInfo[playerid][pLeader];
}
else if(PlayerInfo[playerid][pMember] != -1)
{
Team = PlayerInfo[playerid][pMember];
}
SendClientMessage(playerid, 0x808000AA, "**Members Online**");
new membersOnline = 0;
ForAllPlayers(i){
if(IsPlayerConnected(i)){
new jtext[20];
if(PlayerInfo[i][pJob] == 1) { jtext = "Detektiv"; }
else if(PlayerInfo[i][pJob] == 2) { jtext = "Anwalt"; }
else if(PlayerInfo[i][pJob] == 3) { jtext = "Hure"; }
else if(PlayerInfo[i][pJob] == 4) { jtext = "Drogendealer"; }
else if(PlayerInfo[i][pJob] == 5) { jtext = "Autodieb"; }
else if(PlayerInfo[i][pJob] == 6) { jtext = "Hacker"; }
else if(PlayerInfo[i][pJob] == 7) { jtext = "KFZ-Mechaniker"; }
else if(PlayerInfo[i][pJob] == 8) { jtext = "Taschedieb"; }
else if(PlayerInfo[i][pJob] == 9) { jtext = "Waffenhändler"; }
else if(PlayerInfo[i][pJob] == 10) { jtext = "Bauer"; }
else if(PlayerInfo[i][pJob] == 11) { jtext = "Hotdog-Verkäufer"; }
else if(PlayerInfo[i][pJob] == 14) { jtext = "Tuner"; }
else if(PlayerInfo[i][pJob] == 16) { jtext = "Trucker"; }
else if(PlayerInfo[i][pJob] == 17) { jtext = "Stadtreiniger"; }
else if(PlayerInfo[i][pJob] == 18) { jtext = "Pilot"; }
else if(PlayerInfo[i][pJob] == 19) { jtext = "Kurierfahrer"; }
else if(PlayerInfo[i][pJob] == 20) { jtext = "Müllmann"; }
else { jtext = "Arbeitslos"; }
GetPlayerName(i, sendername, sizeof(sendername));
format(string, sizeof(string), "");
if(PlayerInfo[i][pLeader] == Team && PlayerInfo[i][pRank] == 12)
{
if(PlayerInfo[i][pJailed] != 0)
{
format(string, sizeof(string), "ID: %d | %s (Leader) | Prison/Knast | Job: %s", i, sendername, jtext);
}
else
{
format(string, sizeof(string), "ID: %d | %s (Leader) | Job: %s", i, sendername, jtext);
}
}
else if(PlayerInfo[i][pMember] == Team || PlayerInfo[i][pLeader] == Team)
{
if(PlayerInfo[i][pJailed] != 0)
{
format(string, sizeof(string), "ID: %d | %s | Rank: %d | Prison/Knast | Job: %s", i, sendername, PlayerInfo[i][pRank], jtext);
}
else
{
format(string, sizeof(string), "ID: %d | %s | Rank: %d | Job: %s", i, sendername, PlayerInfo[i][pRank], jtext);
}
}
if(strlen(string) > 1)
{
SendClientMessage(playerid, COLOR_BEIGE, string);
membersOnline += 1;
}
}
}
format(string, sizeof(string), "%d Member Online", membersOnline );
SendClientMessage(playerid, COLOR_BEIGE, string);
}
else
{
SendClientMessage(playerid, COLOR_ERRORTEXT, " Du bist in keiner Gang/Fraktion !");
}
}
return 1;
}
Alles anzeigen
ist von Interroleplay