15.04.2015, 09:05
1.
Are those correct? Anything off or missing?
2. How would I make a player spawn, wherein the data would be taken from the MySQL database? Should it be in :-
Код:
cache_get_row(0, 0, strr); pData[playerid][ID] = strval(strr); cache_get_row(0, 4, strr); pData[playerid][Level] = strval(strr); cache_get_row(0, 5, strr); pData[playerid][Colour] = strval(strr); cache_get_row(0, 6, strr); pData[playerid][RegTime] = strval(strr); cache_get_row(0, 7, strr); pData[playerid][OnlineTime] = strval(strr); cache_get_row(0, 8, strr); pData[playerid][Score] = strval(strr); cache_get_row(0, 9, strr); pData[playerid][Money] = strval(strr); pData[playerid][pX] = cache_get_row_float(0, 10); pData[playerid][pY] = cache_get_row_float(0, 11); pData[playerid][pZ] = cache_get_row_float(0, 12);
2. How would I make a player spawn, wherein the data would be taken from the MySQL database? Should it be in :-
- Under the same stock (stock which contains code being executed after player logs in after password check)?
- Under OnPlayerSpawn or any other callback?