Seems the interior is bugged...
Are you sure it is set to 0 when you make spawn the player? |
Seems the interior is bugged...
Are you sure it is set to 0 when you make spawn the player? |
public OnPlayerSpawn(playerid)
{
TogglePlayerSpectating(playerid, false);
// Anti F4 Bug - Logging/Registering
if(!PlayerInfo[playerid][pLoggedIn] && !IsPlayerNPC(playerid))
{
if(IsPlayerNPC(playerid)) return 1;
SetPlayerPos(playerid, 194.485778, 1103.993408, 16.347635);
SetPlayerCameraPos(playerid, 194.485778, 1103.993408, 16.347635);
SetPlayerCameraLookAt(playerid, 194.485778, 1103.993408, 16.347635);
SetSpawnInfo( playerid, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
new file[64];
format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
// Player isn't banned
if(dini_Int(file, "AdminAccount") == 1)
{
format(file, sizeof(file), "users/%s.ini",RPNU(playerid));
SetPlayerName(playerid, dini_Get(file, "OldName"));
format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
SSSShowDialog(playerid, 2);
}
if(!dini_Exists(file))
{
SSSShowDialog(playerid, 1);
return 1;
}
else
{
SSSShowDialog(playerid, 2);
}
return 1;
}
// Actual Spawning
ResetPlayerWeapons(playerid);
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
if(!strcmp(npcname, "GOD", true)) //Checking if the NPC's name is GOD
{ //Putting the NPC into the vehicle we created for it.
return 1;
}
return 1;
}
if(PlayerInfo[playerid][pLoggedIn] && PlayerInfo[playerid][pSpawn])
{
FalseBan[playerid] = 0;
SetTimerEx("FalseBanFix", 6000, false, "i", playerid);
SpawnChar(playerid);
}
if (!GetPVarInt(playerid, "color")) SetPVarInt(playerid, "color", 18643);
return 1;
}
Can you show me SpawnChar function and OnPlayerConnect callback, please?
|
I fixed the spawn bug but now they spawn in los santos not fort carson i need help moving the spawn point into fort carson.
|
Go to the place where you want to be the spawnpoint, type /save in the chat then check the coordinates in 'savedpositions.txt'.
If you do not know where's the file located at "Documents\GTA San Andreas User Files\SAMP". When you get the coordinates, replace these with the written in SetPlayerPos. |
SetSpawnInfo( playerid, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);