25.07.2016, 00:48
Thanks for the tips @Freaksken
But I solved it using this. Putting it under OnPlayerRequestSpawn and adding
But I solved it using this. Putting it under OnPlayerRequestSpawn and adding
Код:
skinid = GetPlayerSkin(playerid);
PHP код:
public OnPlayerRequestSpawn( playerid )
{
new skinid;
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 );
skinid = GetPlayerSkin(playerid);
SetPlayerSkin(playerid, skinid);
PlayerInfo[ playerid ][ SavedSkin ] = skinid;
PlayerInfo[ playerid ][ IsSavedSkin ] = 1;
return ( 1 );
}