18.12.2010, 18:40
Alright so i have been having trouble with auto spawning for the script i am currently making for a possible release the these forums. So, im wanting to have it on the player login to it'll auto spawn them with there saved skins and guns etc.
Here is what im trying to do, but whenever i spawn it's killing me and tele'ing me to the 0.0,0.0,0.0 cordnites(blue berry).
So i feel like a total noob and don't know why this isn't working. I'll post my on player spawn right now.
Here is what im trying to do, but whenever i spawn it's killing me and tele'ing me to the 0.0,0.0,0.0 cordnites(blue berry).
pawn Код:
SetSpawnInfo(playerid, dini_Int(file, "Faction"), dini_Int(file, "Skin"), PlayerStats[playerid][pPosX], PlayerStats[playerid][pPosY], PlayerStats[playerid][pPosZ], 0.0, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid); // This is right after that.
pawn Код:
new Float:Health = PlayerStats[playerid][pHealth], Float:Armour = PlayerStats[playerid][pArmour];
if(LoggedIn[playerid] == 1)
{
SetPlayerColor(playerid, COLOR_WHITE);
SetPlayerHealth(playerid, Health);
SetPlayerArmour(playerid, Armour);
if(gDead[playerid] == 1)
{
/*SetPlayerPos(playerid, 0.0, 0.0, 0.0);
SetPlayerHealth(playerid, 50.0);
gDead[playerid] = 0;*/
}
}