[HELP] SpawnPlayer not working
#1

Hey guys, i want to disable f4 then i must insert SpawnPlayer(); inside OnPlayerRequestClass, but SpawnPlayer isn't called why?

Код:
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;
}
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.
Reply


Messages In This Thread
[HELP] SpawnPlayer not working - by RaeF - 16.12.2014, 07:37
Re: [HELP] SpawnPlayer not working - by RaeF - 16.12.2014, 07:46
Re: [HELP] SpawnPlayer not working - by buburuzu19 - 16.12.2014, 08:10
Re: [HELP] SpawnPlayer not working - by RaeF - 16.12.2014, 08:11
Re: [HELP] SpawnPlayer not working - by Banana_Ghost - 16.12.2014, 09:12
Re: [HELP] SpawnPlayer not working - by RaeF - 16.12.2014, 11:06

Forum Jump:


Users browsing this thread: 3 Guest(s)