Using cache_get_row_float and other questions
#1

1.
Код:
    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);
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 :-
  • Under the same stock (stock which contains code being executed after player logs in after password check)?
or
  • Under OnPlayerSpawn or any other callback?
Thanks.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)