Help how can I make the native crxknives_get_user_knife(id) work and return the saved value
Код:
public handler_load(FailState, Handle:Query, Error[], Errcode, Data[], DataSize)
{
new index = Data[0];
if(index != find_player("k", Data[1]))
{
SQL_FreeHandle(Query);
return;
}
if(fail_query(FailState, Error, Errcode))
{
console_print(index, "Failed to register");
return;
}
if(SQL_NumResults(Query))
{
g_PlayerStats[index][Player_ID] = SQL_ReadResult(Query, 0);
zp_set_user_ammo_packs(index, SQL_ReadResult(Query, 4));
set_user_xp(index, SQL_ReadResult(Query, 5));
set_user_level(index, SQL_ReadResult(Query, 6));
crxknives_get_user_knife(id) = SQL_ReadResult(Query, 7);
g_iStatus[index] = LOGUEADO;
}
else
{
PlayerRegister(index);
}
SQL_FreeHandle(Query);
}