2021-07-31, 01:21 PM
hi!
i wanted to know is there anyway to clear an array with only a few lines? i have player info in this array:
and i wanted to know how can i clear it in on player disconnect after saving the values in sql, i used to do like this:
and i had to do this for every variable i add, is there anyway to make this more simple?
i wanted to know is there anyway to clear an array with only a few lines? i have player info in this array:
Code:
enum e_playerinfo
{
someInt,
Float:someFloat,
someString[144],
}
new playerInfo[MAX_PLAYERS][e_playerinfo];
and i wanted to know how can i clear it in on player disconnect after saving the values in sql, i used to do like this:
Code:
public OnPlayerDisconnect(...)
{
playerInfo[playerid][...] = 0;
playerInfo[playerid][...] = 0.0;
playerInfo[playerid][...] = "";
...
}