Hi, Wenn ich einen in mein Clan invite, geht zwar /members bei ihm aber seine online Mitglieder werden nicht angezeigt, jedoch wenn man beim /invite Leaderrechte bekommt, funktioniert das
Invite Befehl
ocmd:cinvite(playerid, params[])
{
for(new i = 0;i<MAX_PLAYERS;i++)
{
if(PlayerInfo[playerid][pclanownid] == 0) return SendClientMessage(playerid,COLOR_WHITE,"{00a085}[INFO] {FFFFFF}You can't use this command.");
{
new target;
if(sscanf(params, "ui", target)) return SendClientMessage(playerid, COLOR_WHITE, "{00A085}[INFO] {FFFFFF}/cinvite [playerid/name]");
if(target == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_ERRORTEXT, "This player isn't online.");
new string[125], giveplayerid;
new playername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, playername, sizeof(playername));
format(string, 256, "{00A085}[INFO] {FFFFFF}You have invite %s in your Clan.", giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, 256, "{00a085}[INFO] {FFFFFF}%s has invite you in his Clan.", playername);
SendClientMessage(target, COLOR_WHITE, string);
PlayerInfo[playerid][pclanmemberid] = PlayerInfo[target][pclanownid];
}
}
return 1;
}
Members Befehl
ocmd:members(playerid)
{
new iCounter = 0,
strRank[30],
strtmp[128];
if(PlayerInfo[playerid][pclanownid] == 0 && PlayerInfo[playerid][pclanmemberid] == 0) return SendClientMessage(playerid,COLOR_WHITE,"{00a085}[INFO] {FFFFFF}You aren't in a Clan!");
SendClientMessage(playerid, COLOR_WHITE, "{00A085}Member Online:");
ForAllPlayers(i)
{
if(!IsPlayerConnected(i)) continue;
if(PlayerInfo[i][pclanownid] == PlayerInfo[playerid][pclanownid] && PlayerInfo[i][pclanmemberid] == PlayerInfo[playerid][pclanmemberid])
{
switch(PlayerInfo[i][pclanownid] == PlayerInfo[playerid][pclanownid] && PlayerInfo[i][pclanmemberid] == PlayerInfo[playerid][pclanmemberid])
{
default: strRank = "Member";
}
iCounter++;
format(strtmp, 128, "%s %s (ID: %d)", strRank, GetName(i), i);
SendClientMessage(playerid, COLOR_WHITE, strtmp);
}
}
return 1;
}