Jump to content
  • 0

Problemea salvare clan


bogdan@@@

Question

Salut, eu sunt bogdan, si vreau sa va rog sa ma ajuti cu o problema, am facut un system de clan. am facut ClanTag si clan in database, si la gamemode bigzone ca se sa salveze spe ex adminu te duci la OnPlayerLogin si faci acel rand cu ce vrei sa salveze, asta am facut si eu si nu merge, am verificat toate liniile, am sters tot systemul vechi, am resctis toate enumurile.

 

16229873_406056393068514_208419179_o.png

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0
Chiar acum, bogdan@@@ a spus:

CMD:clan(playerid,params[])
{
    if(PlayerInfo[playerid][pClan] == 0) return  SendClientMessage(playerid, COLOR_YELLOW2, "Eroare: Nu faci parte dintr-un clan!");
    ShowPlayerDialog(playerid, DIALOG_CLAN_COMMAND, DIALOG_STYLE_LIST, "Clan:", "Comenzile clanului\nMembrii clanului\nSetari", "Selecteaza", "Iesi");
    return 1;
}

Incarca pe pastebin, dai edit, am scris sintaxa sql gresita. 

Asta e cea buna:

if(gPlayerLogged[playerid] > 0)
{
	new sqlupdate[512];
	mysql_format(SQL, sqlupdate, sizeof(sqlupdate), "UPDATE `users` SET `Clan`='%d',`ClanRank`='%d' WHERE `id`='%d'",PlayerInfo[playerid][pClan],PlayerInfo[playerid][pClanRank],PlayerInfo[playerid][pSQLID]);
	mysql_tquery(SQL, sqlupdate, "", "");
}	
  • Upvote 1

                        

 

 

Link to comment
Share on other sites

  • 0

La OnPlayerLogin se incarca.

foloseste acest cod la OnPlayerDisconnect

if(gPlayerLogged[playerid] > 0)
{
	new sqlupdate[512];
	mysql_format(SQL, sqlupdate, sizeof(sqlupdate), "UPDATE `users` SET `Clan`='%d',`ClanRank`='%d' WHERE `id`='%d'",PlayerInfo[playerid][pClan],PlayerInfo[playerid][pClanRank],PlayerInfo[playerid][pSQLID]);
	mysql_tquery(SQL, sqlupdate, "", "");
}	

 

Edited by [RW]Robi

                        

 

 

Link to comment
Share on other sites

  • 0

CMD:clan(playerid,params[])
{
    if(PlayerInfo[playerid][pClan] == 0) return  SendClientMessage(playerid, COLOR_YELLOW2, "Eroare: Nu faci parte dintr-un clan!");
    ShowPlayerDialog(playerid, DIALOG_CLAN_COMMAND, DIALOG_STYLE_LIST, "Clan:", "Comenzile clanului\nMembrii clanului\nSetari", "Selecteaza", "Iesi");
    return 1;
}

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.