How to Force spawn a player.
#1

Okay lets say i don't want the player request class thing popping up and things. how will i make it so the player basicly force spawns?
Reply
#2

Under onplayerconnect:

pawn Code:
SpawnPlayer(playerid);
Reply
#3

Quote:
Originally Posted by iGetty
View Post
Under onplayerconnect:

pawn Code:
SpawnPlayer(playerid);
thanks man =,)
Reply
#4

Quote:
Originally Posted by iGetty
View Post
Under onplayerconnect:

pawn Code:
SpawnPlayer(playerid);
just tryed it didnt work =,(
Reply
#5

Hmmm. Are you using a login/register system at all?
Reply
#6

If it's kicking you, you need to have SetSpawnInfo before SpawnPlayer and then it will work. Hope this helps!
Reply
#7

Quote:
Originally Posted by iGetty
View Post
Hmmm. Are you using a login/register system at all?
no im not using a log in or register system.
Reply
#8

Try to do what Steven82 said.
Reply
#9

Quote:
Originally Posted by iGetty
View Post
Try to do what Steven82 said.
Having problems getting it to spawn where i want them to spawn it spawns them in that field and not at the pos they were all ready at im using it like this

SetSpawnInfo( playerid, 0, 0, pos1, pos2, pos3, 269.15, 26, 36, 28, 150, 0, 0 );
SpawnPlayer(playerid);
Reply
#10

Well try using this code:

pawn Code:
// create a new global varibale at top of script
// new FirstSpawn[MAX_PLAYERS char];
public OnPlayerConnect(playerid)
{
    TogglePlayerSpecating(playerid, 1);
    FirstSpawn{playerid} = 1;
    return 1;
}

public OnPlayerSpawn(playerid)
{
    if(FistSpwan{playerid} == 1)
    {
        FirstSpawn{playerid} = 0;
        SetPlayerPos(playerid, pos1, pos2, pos3); // put your postions in here too and see if that works.
        TogglePlayerSpectating(playerid, 0);
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)