SA-MP Forums Archive
Can't spawn - 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: Can't spawn (/showthread.php?tid=448399)



Can't spawn - feartonyb - 04.07.2013

When I login to server it shows me only arrows [<--] [-->] and [Spawn] button like on image:

Whatever I click nothing happens. This is RolePlay server so I don't need classes, I want when player login that he immidiatley spawns. I have:

pawn Код:
SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]);
SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1);
SpawnPlayer(playerid);
under OnPlayerLogin :/

Help please?


Re: Can't spawn - Konstantinos - 04.07.2013

Does it check if someone is registered and force him to login before OnPlayerRequestClass being called?


Re: Can't spawn - feartonyb - 04.07.2013

There is no onplayerrequestclass I sad its RolePlay server, when you connect if you got account then login dialog is shown, if u don't then register dialog is shown. The thing is when player logs in he didn't spawn but this like on image is shown


Re: Can't spawn - feartonyb - 04.07.2013

Bump?


Re : Can't spawn - KimSangBum - 04.07.2013

Your gamemode don't work show me your log


Re: Can't spawn - RedFusion - 04.07.2013

I had this problem. This is what i did:

pawn Код:
new bool:pSkipClass[MAX_PLAYERS];
stock OnPlayerLogin(playerid)
{
 pSkipClass[playerid] = true;
}

public OnPlayerRequestClass(playerid, classid)
{
 if(pSkipClass[playerid] == true)
 {
  pSkipClass[playerid] = false;
  SetTimerEx("PublicSpawn", 1, false, "i", playerid);
  return 1;
 }
 //Rest of the code goes here
 return 1;
}

forward PublicSpawn(playerid);
public PublicSpawn(playerid) SpawnPlayer(playerid);



Re: Can't spawn - feartonyb - 04.07.2013

Fuse bro I want when player logs in that he instantly spawn, not to press arrow to choose class


Re: Can't spawn - IceBilizard - 04.07.2013

try to change
pawn Код:
SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1);
to

pawn Код:
SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z],0, 0, 0, 0, 0, 0, 0);



Re: Can't spawn - GNGification - 04.07.2013

-wops missed something useless answer-


Re: Can't spawn - feartonyb - 04.07.2013

GNG read my thread, I said I already got SpawnPlayer