11.11.2012, 12:14
Okay so this is what I have done:
Login Script:
OnPlayerDeath
Still having problems with the spawn.. It's killing me every time now. I've been debugging in the console and it's setting me in the correct positions also at the correct height. So at least something is working correctly.
Login Script:
PHP Code:
SetSpawnInfo(extraid, 0, playerInfo[extraid][pModel], playerInfo[extraid][pPos][0], playerInfo[extraid][pPos][1], playerInfo[extraid][pPos][2], 1.0, -1, -1, -1, -1, -1, -1);
SetCameraBehindPlayer(extraid);
SetPlayerInterior(extraid, playerInfo[extraid][pInterior]);
SetPlayerVirtualWorld(extraid, playerInfo[extraid][pVirtualWorld]);
SetPlayerSkin(extraid, playerInfo[extraid][pModel]);
SetPlayerHealth(extraid,0);
loginspawn[extraid]++;
SpawnPlayer(extraid);
SetTimerEx("SkinDelay", 1000, false, "d", extraid);
PHP Code:
if(loginspawn[playerid] == 1)
{
loginspawn[playerid] = 0;
SetPlayerHealth(playerid, playerInfo[playerid][pHealth]);
SetPlayerArmour(playerid, playerInfo[playerid][pArmour]);
}