SA-MP Forums Archive
Spawn point - 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 point (/showthread.php?tid=448814)



Spawn point - Drake Star - 05.07.2013

I am trying to move my spawn point in fort carson because the server is based in fort carson and the los santos spawn is bugged you keep falling and you never die and spawn.


here is a pic of the bug




this is where i need the spawn to be


Respuesta: Spawn point - [DOG]irinel1996 - 05.07.2013

Seems the interior is bugged...

Are you sure it is set to 0 when you make spawn the player?


Re: Respuesta: Spawn point - Drake Star - 06.07.2013

Quote:
Originally Posted by [DOG]irinel1996
View Post
Seems the interior is bugged...

Are you sure it is set to 0 when you make spawn the player?
What you mean changed what to 0?


Re: Spawn point - SilverKiller - 06.07.2013

You maybe have something like this in onplayerspawn :

SetPlayerInterior(playerid, interiorid);

if the interiorid is not 0, then change it to 0.


Re: Respuesta: Spawn point - Drake Star - 06.07.2013

Quote:
Originally Posted by [DOG]irinel1996
View Post
Seems the interior is bugged...

Are you sure it is set to 0 when you make spawn the player?
PHP Code:
public OnPlayerSpawn(playerid)
{
    
TogglePlayerSpectating(playeridfalse);
    
// Anti F4 Bug - Logging/Registering
    
if(!PlayerInfo[playerid][pLoggedIn] && !IsPlayerNPC(playerid))
    {
        if(
IsPlayerNPC(playerid)) return 1;
        
SetPlayerPos(playerid194.4857781103.99340816.347635);
        
SetPlayerCameraPos(playerid194.4857781103.99340816.347635);
        
SetPlayerCameraLookAt(playerid194.4857781103.99340816.347635);
        
SetSpawnInfoplayerid000000000000);
        new 
file[64];
        
format(filesizeof(file), "users/%s.ini"RPNU(playerid));
        
// Player isn't banned
        
if(dini_Int(file"AdminAccount") == 1)
        {
            
format(filesizeof(file), "users/%s.ini",RPNU(playerid));
            
SetPlayerName(playeriddini_Get(file"OldName"));
            
format(filesizeof(file), "users/%s.ini"RPNU(playerid));
            
SSSShowDialog(playerid2);
        }
        if(!
dini_Exists(file))
        {
            
SSSShowDialog(playerid1);
            return 
1;
        }
        else
        {
            
SSSShowDialog(playerid2);
        }
        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(playeridnpcnamesizeof(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"6000false"i"playerid);
         
SpawnChar(playerid);
    }
    if (!
GetPVarInt(playerid"color")) SetPVarInt(playerid"color"18643);
    return 
1;


this is the onplayerconnect


Respuesta: Spawn point - [DOG]irinel1996 - 06.07.2013

Can you show me SpawnChar function and OnPlayerConnect callback, please?


Re: Respuesta: Spawn point - Drake Star - 06.07.2013

Quote:
Originally Posted by [DOG]irinel1996
View Post
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.


Re: Spawn point - nickyW - 06.07.2013

Quote:
Originally Posted by Drake Star
View Post
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.


Re: Spawn point - Drake Star - 06.07.2013

Quote:
Originally Posted by nickyW
View Post
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.
Okay do i copy the whole /save coords or no? i did /save and i got 293,-237.2804,1215.1868,19.9268,92.7241,0,0,0,0,0,0


Re: Spawn point - CAR - 06.07.2013

Remove this line:
pawn Code:
SetSpawnInfo( playerid, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
from the OnPlayerSpawn that you posted