02.07.2018, 16:52
So is it going to be like this?
PHP код:
AssignPlayerData(playerid)
{
new rows;
cache_get_row_count(rows);
if(rows)
{
new loaded;
while(loaded < rows)
{
cache_get_value_int(loaded, "id", pInfo[playerid][ID]);
cache_get_value_int(loaded, "kills", pInfo[playerid][pKills]);
cache_get_value_int(loaded, "deaths", pInfo[playerid][pDeaths]);
cache_get_value_int(loaded, "admin", pInfo[playerid][pAdmin]);
cache_get_value_int(loaded, "vip", pInfo[playerid][pVIP]);
cache_get_value_int(loaded, "money", pInfo[playerid][pMoney]);
cache_get_value_float(loaded, "x", pInfo[playerid][X_Pos]);
cache_get_value_float(loaded, "y", pInfo[playerid][Y_Pos]);
cache_get_value_float(loaded, "z", pInfo[playerid][Z_Pos]);
cache_get_value_float(loaded, "angle", pInfo[playerid][A_Pos]);
cache_get_value_int(loaded, "interior", pInfo[playerid][pInterior]);
loaded++;
}
}
GivePlayerMoney(playerid, pInfo[playerid][pMoney]);
return 1;
}