16.12.2014, 07:37
Hey guys, i want to disable f4 then i must insert SpawnPlayer(); inside OnPlayerRequestClass, but SpawnPlayer isn't called why?
Images:
Before, my skin id is 1 and here is first position, ( im forget the ss ), then i press F4, /kill and it look like Image 1., when i press spawn, it spawn me to blueberry lol . . .
Image 1.
Image 2.
Код:
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; }
Before, my skin id is 1 and here is first position, ( im forget the ss ), then i press F4, /kill and it look like Image 1., when i press spawn, it spawn me to blueberry lol . . .
Image 1.
Image 2.