SA-MP Forums Archive
Spawn Problems - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Spawn Problems (/showthread.php?tid=600439)



Spawn Problems - Adrianos - 08.02.2016

I bought the house give / changespawn and all the usual spawn me respawn.

forward LoadPlayerSpawnData(playerid);
public LoadPlayerSpawnData(playerid)
{
for(new i = 0; i < sizeof(ApartmentInfo); i++)
{
GetPlayerName(playerid, plname, sizeof(plname));
if(strcmp(ApartmentInfo[i][sOwner], plname, false ) == 0 && ApartmentInfo[i][sSpawn] == 1)
{
SetPlayerPos(playerid, ApartmentInfo[i][sEnterx],ApartmentInfo[i][sEntery],ApartmentInfo[i][sEnterz]);
}
}
TextDrawShowForPlayer(playerid, ServerTimeTXT);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
SetPlayerPos(playerid, 1743.0449,-1861.1635,13.5779);
SetPlayerHealth(playerid, 100);
SetPlayerInterior( playerid, PlayerInfo[playerid][pInterior] );
SetPlayerVirtualWorld( playerid, PlayerInfo[playerid][pVirtualWorld] );
}


Re: Spawn Problems - K0P - 08.02.2016

Put these lines under OnPlayerSpawn
maybe this will fix

Код:
for(new i = 0; i < sizeof(ApartmentInfo); i++)
{
GetPlayerName(playerid, plname, sizeof(plname));
if(strcmp(ApartmentInfo[i][sOwner], plname, false ) == 0 && ApartmentInfo[i][sSpawn] == 1)
{
SetPlayerPos(playerid, ApartmentInfo[i][sEnterx],ApartmentInfo[i][sEntery],ApartmentInfo[i][sEnterz]);
}
}
TextDrawShowForPlayer(playerid, ServerTimeTXT);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
SetPlayerPos(playerid, 1743.0449,-1861.1635,13.5779);
SetPlayerHealth(playerid, 100);
SetPlayerInterior( playerid, PlayerInfo[playerid][pInterior] );
SetPlayerVirtualWorld( playerid, PlayerInfo[playerid][pVirtualWorld] );



Re: Spawn Problems - Adrianos - 08.02.2016

no working !


Re: Spawn Problems - SecretBoss - 08.02.2016

Try returning 1 when the check is done


Re: Spawn Problems - Adrianos - 08.02.2016

working ! Thx !