28.01.2018, 02:39
Hello There, I have a problem, i came back to SA-MP Coding after a years Programming C++ and C#, i have a problem, Whenever i logged in into my account, it instantly set the camera to the place that has escalator in LV

i don't know where is the problem, i already tried to call OnPlayerRequestClass, but it doesn't work
pls help :c

i don't know where is the problem, i already tried to call OnPlayerRequestClass, but it doesn't work
Код:
cache_set_active(pInfo[playerid][Player_Cache]); cache_get_value_int(0, "KILLS", pInfo[playerid][Kills]); cache_get_value_int(0, "DEATHS", pInfo[playerid][Deaths]); cache_get_value_int(0, "SCORE", pInfo[playerid][Score]); cache_get_value_int(0, "CASH", pInfo[playerid][Cash]); SetPlayerScore(playerid, pInfo[playerid][Score]); ResetPlayerMoney(playerid); GivePlayerMoney(playerid, pInfo[playerid][Cash]); cache_delete(pInfo[playerid][Player_Cache]); pInfo[playerid][Player_Cache] = MYSQL_INVALID_CACHE; pInfo[playerid][LoggedIn] = true; SendClientMessage(playerid, 0x00FF00FF, "Logged in to the account."); OnPlayerRequestClass(playerid, 0);
Код:
public OnPlayerRequestClass(playerid, classid) { SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746); SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746); SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746); return 1; }