MySQL problem
#1

I've made an vip system on an MySQL server made by me and when i give someone the vip it doesn't save

Command:
Код:
CMD:makevip(playerid, params[])
{
	if(Player[playerid][pAdminLevel] >= 3)
	{
		new id, level, string[126];
		if(sscanf(params, "ud", id, level))
			return SendClientMessage(playerid, -1, "Syntax: /makevip [playerid] [level]");
			
		Player[id][pvStatus] = level;
		
		format(string, sizeof(string), "%s has made you a VIP level %d", GetNameEx(playerid), level);
		SendClientMessage(id, -1, string);
		
		format(string, sizeof(string), "You have made %s a VIP level %d", GetNameEx(id), level);
		SendClientMessage(playerid, -1, string);
	}
	return 1;
}
I've made a stock to save automatic

Код:
stock SavePlayer(playerid)
{
	new query[356], EncryptedPass[130];
	
	WP_Hash(EncryptedPass, sizeof(EncryptedPass), Player[playerid][pPassword]);

	GetPlayerPos(playerid, Player[playerid][pPosition][0], Player[playerid][pPosition][1], Player[playerid][pPosition][2]);
	
	format(query, sizeof(query), "UPDATE accounts SET pName = '%s', pPassword = '%s', pAdminLevel = %d, pPlayerPos = '%f %f %f', pMoney = %d, pVip = %d, pMuted = %d, pWarnings = %d, pWarningReasons = '%s|%s|%s' WHERE pid = %d", GetName(playerid), Player[playerid][pPassword], Player[playerid][pAdminLevel], Player[playerid][pPosition][0], Player[playerid][pPosition][1], Player[playerid][pPosition][0], Player[playerid][pSkin], Player[playerid][pMoney], Player[playerid][pvStatus],
	Player[playerid][pMuted], Player[playerid][pWarnings], Player[playerid][pWarningReason1], Player[playerid][pWarningReason2], Player[playerid][pWarningReason3], Player[playerid][pID]);
	mysql_query(query);
	
	printf("Player ID %d (%s) has been saved", playerid, GetName(playerid));
}
Cand anybody help me please i use this MySQL:

https://sampforum.blast.hk/showthread.php?tid=122983
Reply


Messages In This Thread
MySQL problem - by AnoTek - 16.08.2015, 18:14
Re: MySQL problem - by LetsOWN[PL] - 16.08.2015, 18:41
Re: MySQL problem - by AnoTek - 16.08.2015, 18:58
Re: MySQL problem - by AnoTek - 16.08.2015, 19:12
Re: MySQL problem - by Evocator - 16.08.2015, 19:19

Forum Jump:


Users browsing this thread: 1 Guest(s)