01.06.2015, 16:36
Quote:
Then how to load player account ? ?
Код:
public LoadAccount(playerid) { cache_get_field_content(0,"Password",pInfo[playerid][Password]); pInfo[playerid][Level] = cache_get_field_content_int(0,"Level"); pInfo[playerid][Hours] = cache_get_field_content_int(0,"Hours"); pInfo[playerid][Minutes] = cache_get_field_content_int(0,"Minutes"); return 1; } |
The first parameter of cache_get_field_content is the row index(which start at 0). So it's okay to use 0 if you only load 1 row(like you do here).
But if you select multiple rows, you will need to loop through all of them because index 0 is merely the first row, that second one will be at index 1 and so on.