Jump to content
  • 0

Problema cmd:cinvite


TeamViewer

Question

Salut, cand incerc sa dau cinvite imi spune "You have reached maximum members.".

Ma puteti ajuta va rog frumos?

CMD:cinvite(playerid, params[])
{
    if(LogatPin[playerid] == 0) return SCM(playerid, -1, "Contul tau este {ff0000}blocat{ffffff}, foloseste {ff0000}/pin{ffffff} pentru a-l debloca");
    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;
}
CMD:shop(playerid, params[])
{
    if(LogatPin[playerid] == 0) return SCM(playerid, -1, "Contul tau este {ff0000}blocat{ffffff}, foloseste {ff0000}/pin{ffffff} pentru a-l debloca");
	if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
    {
        new titlestring[MAX_STRING],string1[MAX_STRING],string2[MAX_STRING],string3[MAX_STRING],string4[MAX_STRING],string5[MAX_STRING],string6[MAX_STRING],string7[MAX_STRING],iString[1500];
  		format(titlestring, sizeof(titlestring), "Premium points: {00FFFF}%d", PlayerInfo[playerid][pPremiumPoints]);
  		format(string1, sizeof(string1), "{00FFFF}[+]{FFFFFF} Get Premium Points");
  		format(string2, sizeof(string2), "{FFFFFF}Premium account [{00FFFF}60{FFFFFF} premium points]\n{FFFFFF}Change Nickname [{00FFFF}50{FFFFFF} premium points]");
  		format(string3, sizeof(string3), "{FFFFFF}Clear 20 FP [{00FFFF}20{FFFFFF} premium points]\n{FFFFFF}Clear 40 FP [{00FFFF}40{FFFFFF} premium points]");
  		format(string4, sizeof(string4), "{FFFFFF}Clear warns [{00FFFF}20{FFFFFF} premium points]\n{FFFFFF}Create Clan [{00FFFF}100{FFFFFF} premium points] ({00FF00} Awesome{FFFFFF} )\n{FFFFFF}Quest Map [{00FFFF}30{FFFFFF} premium points]");
  		format(string5, sizeof(string5), "{FFFFFF}Vehicle hidden color [{00FFFF}20{FFFFFF} premium points]\n{FFFFFF}20x fireworks [{00FFFF}5{FFFFFF} premium points]");
  		format(string6, sizeof(string6), "{FFFFFF}Buy vehicle slot [{00FFFF}25{FFFFFF} premium points]\n{FFFFFF}iPhone [{00FFFF}15{FFFFFF} premium points\n{FFFFFF}Clear KM & Distance [{00FFFF}20{FFFFFF} premium points]");
  		format(string7, sizeof(string7), "{FFFFFF}Buy $300,000 [{00FFFF}1{FFFFFF} premium points]\n{FFFFFF}Buy $3,000,000 [{00FFFF}10{FFFFFF} premium points\n{FFFFFF}Buy $15,000,000 [{00FFFF}50{FFFFFF} premium points]\n{FFFFFF}Buy $30,000,000 [{00FFFF}100{FFFFFF} premium points]\n{E67E30}[+]{FFFFFF} Premium Cars");
  		format(iString, sizeof(iString), "%s\n%s\n%s\n%s\n%s\n%s\n%s", string1, string2, string3, string4, string5, string6, string7);
	 	ShowPlayerDialog(playerid,DIALOG_SHOP,DIALOG_STYLE_LIST, titlestring, iString, "Buy","Exit");
    }
    return 1;
}
public LoadClanInfo()
{
    clanss = cache_num_rows();
    for(new i = 1; i <= clanss; i++)
    {
		new x = i - 1;
		ClanInfo[i][cClanID]              		= cache_get_field_content_int(x, "clanID");
		ClanInfo[i][cClanExpire]              	= cache_get_field_content_int(x, "clanExpire");
		ClanInfo[i][cClanActive]              	= cache_get_field_content_int(x, "clanActive");
		ClanInfo[i][cClanSlots]              	= cache_get_field_content_int(x, "clanSlots");
        cache_get_field_content(x, "clanName", ClanInfo[i][cClanName], SQL, 130);
		cache_get_field_content(x, "clanColor", ClanInfo[i][cClanColor], SQL, 130);
		cache_get_field_content(x, "clanMOTD", ClanInfo[i][cClanMOTD], SQL, 130);
   	    cache_get_field_content(x, "clanTag", ClanInfo[i][cClanTag], SQL, 130);
    	cache_get_field_content(x, "clanRankName7", ClanInfo[i][cClanRankName7], SQL, 130);
    	cache_get_field_content(x, "clanRankName6", ClanInfo[i][cClanRankName6], SQL, 130);
    	cache_get_field_content(x, "clanRankName5", ClanInfo[i][cClanRankName5], SQL, 130);
    	cache_get_field_content(x, "clanRankName4", ClanInfo[i][cClanRankName4], SQL, 130);
    	cache_get_field_content(x, "clanRankName3", ClanInfo[i][cClanRankName3], SQL, 130);
    	cache_get_field_content(x, "clanRankName2", ClanInfo[i][cClanRankName2], SQL, 130);
    	cache_get_field_content(x, "clanRankName1", ClanInfo[i][cClanRankName1], SQL, 130);
	}
	printf("Clans: %d", clanss);
}

Baza de date: http://prntscr.com/fp1iuz

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

La aceasta linie este problema 

 if(GetClanMembers(PlayerInfo[playerid][pClan]) >= ClanIanfo[PlayerInfo[playerid][pClan]][cClnSlots]) return SendClientMessage(playerid, COLOR_WHITE, "You have reached maximum members.");

arata-mi si comanda cmd:accept zona "clan"

Edited by Camataru
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.