Jump to content
  • 0

nu se salveaza Tag clan


vlady100

Question

Problema intalnita (descriere): creez un clan și simplu, nu se salveaza tag-ul când dau restart la joc iar când apăs tasta tab nu apare tag-ul dar jos lângă nume apare
Ero(area / rile) / warning-(ul / urile): m-am uitat, nu sunt errori sau ceva....
Liniile de cod / sursa / script-ul(obligatoriu): gamemod-ul


Imagini / Video (optional): nu prea cred că se văd dar sper să ajute
Ati incercat sa rezolvati singur?: m-am uitat prin gm, m-am uitat și prin alt gm asemănător și este diferit, nu-mi pot da seama de ce nu se salvează și de ce nu apare tag-ul în tab.

sa-mp-000.png

sa-mp-001.png

sa-mp-002.png

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0

ai nevoie de comandă? sau ?

 

edit:

 

CMD:clan(playerid, params[])
{
	if(PlayerInfo[playerid][pClan] >= 1)
	{
		ShowPlayerDialog(playerid, DIALOG_CLAN, DIALOG_STYLE_LIST, "Clan", "Clan Help\nClan Members\nClan Settings\nClan Tag", "Select", "Close");
	}
	return 1;
}
	if(dialogid == DIALOG_CLAN_TAG)
	{
			if(!response)
			{
				ShowPlayerDialog(playerid, DIALOG_CLAN, DIALOG_STYLE_LIST, "Clan", "Clan Help\nClan Members\nClan Settings\nClan Tag", "Select", "Close");
			}
			else
			{
				if(PlayerInfo[playerid][pClan] >= 1)
				{
					new szName[25],str111[256],str222[256],str333[256],stringname[128],strings[128];
					switch(listitem)
					{
						case 0:
						{
							format(szName, sizeof(szName), "%s", PlayerInfo[playerid][pNormalName]);
							SetPlayerName(playerid, PlayerInfo[playerid][pNormalName]);
							PlayerInfo[playerid][pClanTag] = 0;
                            mysql_format(SQL, str111, sizeof(str111), "UPDATE users SET `ClanTag`='0' WHERE `name`='%s'", PlayerInfo[playerid][pNormalName]);
	       				 	mysql_tquery(SQL,str111,"","");
						}
						case 1:
						{
							format(szName, sizeof(szName), "%s%s", ClanInfo[PlayerInfo[playerid][pClan]][cClanTag], PlayerInfo[playerid][pNormalName]);
                            SetPlayerName(playerid, szName);
							PlayerInfo[playerid][pClanTag] = 1;
                            mysql_format(SQL,str222, sizeof(str222), "UPDATE users SET `ClanTag`='1' WHERE `name`='%s%s'", PlayerInfo[playerid][pNormalName]);
	       				 	mysql_tquery(SQL,str222,"","");
						}
						case 2:
						{
							format(szName, sizeof(szName), "%s%s", PlayerInfo[playerid][pNormalName], ClanInfo[PlayerInfo[playerid][pClan]][cClanTag]);
                            SetPlayerName(playerid, szName);
							PlayerInfo[playerid][pClanTag] = 2;
                            mysql_format(SQL,str333, sizeof(str333), "UPDATE users SET `ClanTag`='2' WHERE `name`='%s%s'", PlayerInfo[playerid][pNormalName]);
	       				 	mysql_tquery(SQL,str333,"","");
						}
					}
					format(strings,sizeof(strings),"Your nickname is now: %s",szName);
					SendClientMessage(playerid, COLOR_GENANNOUNCE, strings);
					format(stringname,sizeof(stringname),"%s / RPG.pawn-team.RO",szName);
					PlayerTextDrawSetString(playerid, logo[playerid], stringname);
					PlayerTextDrawShow(playerid, logo[playerid]);
				}
				else
				{
					hidePlayerDialog(playerid);
				}
			}
		}

 

Edited by vlady100
Link to comment
Share on other sites

  • 0

Trebuie sa verifici PlayerInfo[playerid][pClanTag] atunci cand jucatorul se logheaza pe server si sa-i setezi numele dupa valoarea variabilei de mai sus. te poti inspira de la dialoguri acolo unde setezi tag-ul prin comanda /clan.

Edited by Jamal Alin
greseala

Cea mai sigura sursa de facut bani de buzunar in mediul virtual. Inregistreaza-te si pune-te pe treaba !!!

http://www.viespar.ro/?reff=ab8e9d8086304d6136eac03c710238d7

Link to comment
Share on other sites

  • 0

am încercat să caut, la login e scris așa:

 

    if(PlayerInfo[playerid][pClan] > 1)
    {
        new szName[25];
        if(PlayerInfo[playerid][pClanTag] == 0)
        {
        	format(szName,256,"%s",PlayerInfo[playerid][pNormalName]);
			SetPlayerName(playerid, szName);
        }
  		else if(PlayerInfo[playerid][pClanTag] == 1)
        {
            format(szName, sizeof(szName), "%s%s", ClanInfo[PlayerInfo[playerid][pClan]][cClanTag], PlayerInfo[playerid][pNormalName]);
            SetPlayerName(playerid, szName);
		}
		else if(PlayerInfo[playerid][pClanTag] == 2)
		{
            format(szName, sizeof(szName), "%s%s", PlayerInfo[playerid][pNormalName], ClanInfo[PlayerInfo[playerid][pClan]][cClanTag]);
            SetPlayerName(playerid, szName);
		}
	}

ce mai trebuie să scriu sau ce nu e bine?

Link to comment
Share on other sites

  • 0

If(PlayerInfo[playerid][pClan] > 1)// aici cred ca esdte problema, daca clanul tau are id 1 nu functioneaza corect, asta daca la aceasta variabila este setata ca valoarea id clanului. Deci ar trebnuie sa pui 0 in loc de 1, acum depinde cum e si sistemul ala facut. Daca nu asta e rezolvarea nu ramane decat sa-mi arati si scriptul care creaza clanul in baza de date (comanda sau dialogul).

Edited by Jamal Alin

Cea mai sigura sursa de facut bani de buzunar in mediul virtual. Inregistreaza-te si pune-te pe treaba !!!

http://www.viespar.ro/?reff=ab8e9d8086304d6136eac03c710238d7

Link to comment
Share on other sites

  • 0
if(listitem == 6)
				{
					new i,stringyy[500];
					if(PlayerInfo[playerid][pPremiumPoints] >= 100)
					{
						if(PlayerInfo[playerid][pClan] == 0)
						{
							PlayerInfo[playerid][pPremiumPoints] -= 100;
							format(stringyy, sizeof(stringyy), "You have bought a clan! (-100 premium points)");
							SendClientMessage(playerid, COLOR_YELLOW, stringyy);
							PlayerInfo[playerid][pCRank] = 7;

						//	mysql_format(SQL, safeString, sizeof(safeString), "INSERT INTO clans (clanName) VALUES('New Clan')");
						//	mysql_tquery(SQL,safeString,"","");
						//	i = mysql_insert_id();
							//========
							new Cache: resultoccc = mysql_query(SQL,  "INSERT INTO `clans` (`clanName`) VALUES('New Clan')");

							i = cache_insert_id();
        					cache_delete(resultoccc);
							
							ClanInfo[i][cClanExpire] = gettime() + (90*86400);

							PlayerInfo[playerid][pClan] = i;
							
							mysql_format(SQL, stringyy, sizeof(stringyy), "UPDATE `clans` SET `clanExpire`='%d' WHERE `clanID`='%d'",ClanInfo[i][cClanExpire],i);
							mysql_tquery(SQL, stringyy, "", "");

							new y,m,d,h,mi,s;
							getdate(y,m,d);
							gettime(h,mi,s);
							mysql_format(SQL, stringyy, sizeof(stringyy), "UPDATE users SET `CRank`='7',`Clan`='%d',`PremiumPoints`='%d',`ClanJoin`='%02d-%02d-%d %02d:%02d:%02d' WHERE `name`='%s'", PlayerInfo[playerid][pClan], PlayerInfo[playerid][pPremiumPoints],d,m,y,h,mi,s,PlayerInfo[playerid][pNormalName]);
        					mysql_tquery(SQL,stringyy,"","");
        					
							new strings[200],name[30],stringss[200],str[300];
        					GetPlayerName(playerid, name, sizeof(name));
							format(strings, sizeof(strings), "/shop: %s created a new clan.",name);
							ABroadCast(COLOR_YELLOW,strings,6);
							mysql_real_escape_string(strings, stringss);
							mysql_format(SQL,str,sizeof(str), "INSERT INTO `shop_logs` (`playerid`,`Message`) VALUES('%d','%s')",PlayerInfo[playerid][pSQLID],stringss);
							mysql_tquery(SQL,str,"","");
							ShowPlayerDialog(playerid, DIALOG_CHOOSECLANNAME, DIALOG_STYLE_INPUT, "Clan name", "Insert clan name in the box below:\n(You can't change it after that!)", "Ok", "");

						}
						else return SCM(playerid,COLOR_WHITE,"You already are in a clan! Use /quitclan first.");
					}
					else return ShowPlayerDialog(playerid, DIALOG_NOPP, DIALOG_STYLE_MSGBOX, "Not enough points", "You don't have enough premium points to do this.", "Close", "");
				}

asta e comanda de creat clan.

Link to comment
Share on other sites

  • 0
35 minutes ago, Jamal Alin said:

If(PlayerInfo[playerid][pClan] > 1)// aici cred ca esdte problema, daca clanul tau are id 1 nu functioneaza corect, asta daca la aceasta variabila este setata ca valoarea id clanului. Deci ar trebnuie sa pui 0 in loc de 1, acum depinde cum e si sistemul ala facut. Daca nu asta e rezolvarea nu ramane decat sa-mi arati si scriptul care creaza clanul in baza de date (comanda sau dialogul).

asta? am făcut și tot nu merge, mă poți ajuta pe skype?

Link to comment
Share on other sites

  • 0

Verifica in functia care salveaza datele conturilor in baza de date si functia care de incarca din baza de date in variabile, in special sa vezi daca e pus corect acel PlayerInfo[playerid][pClanTag]

Cea mai sigura sursa de facut bani de buzunar in mediul virtual. Inregistreaza-te si pune-te pe treaba !!!

http://www.viespar.ro/?reff=ab8e9d8086304d6136eac03c710238d7

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.