rstefan99 Posted February 19, 2017 Share Posted February 19, 2017 Salut am un gamemode editat 60% ,dar de cand l-am luat a avut o problema la clan,la cinvite.Creez un clan,tagu merge.Dar cand vreau sa invit pe cineva imi spune "You have reached maximum members."desi sunt doar eu in clan.Probabil problema e din alta parte..dar las aici comanda.. CMD:cinvite(playerid, params[]) { if(PlayerInfo[playerid][pCRank] < 6) return SendClientMessage(playerid, COLOR_WHITE, "Doar playerii cu rank 6 si 7 pot invita membri in clan."); new userID,giveplayer[25],sendername[25],szMessage[119]; if(sscanf(params, "u", userID)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /cinvite [id]"); { if(GetClanMembers(PlayerInfo[playerid][pClan]) >= ClanInfo[PlayerInfo[playerid][pClan]][cClanSlots]) return SendClientMessage(playerid, COLOR_WHITE, "You have reached maximum members."); if(userID == playerid) return SendClientMessage(playerid, COLOR_WHITE, "Nu poti sa te inviti singur in clan."); if(ClanInfo[PlayerInfo[playerid][pClan]][cClanActive] < 1) return SendClientMessage(playerid, COLOR_WHITE, "Nu poti invita membri deoarece clanul a expirat (pentru prelungire intra pe panel)."); if(IsPlayerConnected(userID)) { if(PlayerInfo[userID][pClan] == 0) { GetPlayerName(userID,giveplayer,sizeof(giveplayer)); format(szMessage, sizeof(szMessage), "You have invited %s to join your clan.", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, szMessage); GetPlayerName(playerid,sendername,sizeof(sendername)); format(szMessage, sizeof(szMessage), "%s te-a invitat in clanul %s. Foloseste /accept cinvite %d pentru a accepta.", sendername, ClanInfo[PlayerInfo[playerid][pClan]][cClanName], playerid); SendClientMessage(userID, COLOR_BLUE, "Invitatie noua in clan:"); SendClientMessage(userID, COLOR_BLUE, szMessage); SetPVarInt(userID, "cinvID", PlayerInfo[playerid][pClan]); SetPVarInt(userID, "cinvIDD", playerid); } } } return 1; } Quote Link to comment Share on other sites More sharing options...
Kingsley Posted February 20, 2017 Share Posted February 20, 2017 Cea mai simpla soluție e să scoți asta: if(GetClanMembers(PlayerInfo[playerid][pClan]) >= ClanInfo[PlayerInfo[playerid][pClan]][cClanSlots]) return SendClientMessage(playerid, COLOR_WHITE, "You have reached maximum members."); Dacă nu verifică funcția GetClanMembers sau variabila cClanSlots. (debugging) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.