20.05.2017, 12:12
312 Bytes string for all players, rly ?
10 x 4 Bytes integer values vs 312 Bytes String
BitFunctions:
https://sampforum.blast.hk/showthread.php?tid=591223
PHP код:
/*
IsTogglePlayerSkin(playerid,skinid);
TogglePlayerSkin(playerid,skinid,toggle); //toggle 0/1
*/
new unlockedSkin[MAX_PLAYERS][GetConfigSize(312)]; //real size MAX_PLAYERS * 10
#define IsTogglePlayerSkin(%0,%1) IsToggleConfigInformation(unlockedSkin[(%0)],(%1))
#define TogglePlayerSkin(%0,%1,%2) ToggleConfigInformation(unlockedSkin[(%0)],(%1),(%2))
// mysql/ini data store
//0 - 9
for(new i = 0; i < GetConfigSize(312); i++){
//get or save unlockedSkin[playerid][i]
}
BitFunctions:
https://sampforum.blast.hk/showthread.php?tid=591223