public OnPlayerRequestClass(playerid, classid) { if (IsPlayerNPC(playerid)) return 1; if (!PlayerData[playerid][pAccount]) { new time[3]; gettime(time[0], time[1], time[2]); SetPlayerTime(playerid, time[0], time[1]); TogglePlayerSpectating(playerid, 1); TogglePlayerControllable(playerid, 0); new ORM:ormid = PlayerData[playerid][ORM_ID] = orm_create("Users", g_Handle); orm_addvar_int(ormid, PlayerData[playerid][pID], "ID"); orm_addvar_string(ormid, PlayerData[playerid][pUsername], MAX_PLAYER_NAME, "Username"); orm_addvar_string(ormid, PlayerData[playerid][pPassword], 129, "Password"); orm_addvar_float(ormid, PlayerData[playerid][pPos][0], "PosX"); orm_addvar_float(ormid, PlayerData[playerid][pPos][1], "PosY"); orm_addvar_float(ormid, PlayerData[playerid][pPos][2], "PosZ"); orm_addvar_int(ormid, PlayerData[playerid][pSkin], "Skin"); orm_addvar_int(ormid, PlayerData[playerid][pMoney], "Money"); orm_setkey(ormid, "Username"); orm_load(ormid, "OnPlayerDataLoaded", "dd", playerid, g_MysqlRaceCheck[playerid]); PlayerData[playerid][pAccount] = 1; } else { SpawnPlayer(playerid); } return 1; }
public OnPlayerSpawn(playerid)
{ ResetPlayerMoney(playerid); GivePlayerMoney(playerid, PlayerData[playerid][pMoney]); return 1; } |
public OnPlayerSpawn(playerid)
{
SetPlayerPos(playerid, 1722.2124,-1610.8375,13.5469);
SetPlayerFacingAngle(playerid, 357.7353);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid,0);
SetCameraBehindPlayer(playerid);
return 1;
}
If that is all that is in your OnPlayerSpawn then I assume your AddPlayerClass Coordinates or SetSpawnInfo is pointing at coordinates 0.00,0.00,0.00 or something similar, as those coordinates are located in blueberry. Try adding something like this under OnPlayerSpawn.
pawn Код:
|