24.07.2016, 21:43
I need help guys. I want to save the skin of the player directly to MySQL after they choose their desired skin on onPlayerRequestClass but I don't know how and what the correct format script is.
This is script for my command cmd:/skin, you might need this for more info.
This is script for my command cmd:/skin, you might need this for more info.
PHP код:
format(gsQuery,sizeof(gsQuery),"UPDATE `accounts` SET `SavedSkin` = '%d' WHERE `Key` = '%d'",skinid,PlayerInfo[ playerid ][ AccID ]);
mysql_query( gsQuery, THREAD_NONE, playerid );
format(gsQuery,sizeof(gsQuery),"UPDATE `accounts` SET `IsSavedSkin` = '1' WHERE `Key` = '%d'",skinid,PlayerInfo[ playerid ][ AccID ]);
mysql_query( gsQuery, THREAD_NONE, playerid );
SetPlayerSkin(playerid, skinid);
PlayerInfo[ playerid ][ SavedSkin ] = skinid;
PlayerInfo[ playerid ][ IsSavedSkin ] = 1;