Spawn player without class
#1

How can I do that instantly after succession in logging in, the player will spawn (without that "<" ">" "Spawn" where I have to click on it.)
Reply
#2

SetSpawnInfo and SpawnPlayer is what you are going to need.
Reply
#3

Quote:
Originally Posted by Unte99
Посмотреть сообщение
SetSpawnInfo and SpawnPlayer is what you are going to need.
Add this to LoadChar function ? What team etc should I use on an RP server ?

Note: LoadChar function is used to retrieve all info from MySQL database

EDIT: The callback called after clicking this spawn button is OnPlayerRequestSpawn or OnPlayerRequestClass ?
Reply
#4

PHP код:
forward SkipSpawn(playerid);
public 
OnPlayerRequestClass(playerid)
{
  
SetTimerEx("SkipSpawn",0,1,"i",playerid);//It's required to have atleast 1 millisecond
  
return 1;
}
public 
SkipSpawn(playerid)
{
  
//Set Spawn Information Here Using SpawnInfo(...);
  
SpawnPlayer(playerid);
  return 
1;

Reply
#5

Quote:
Originally Posted by NeXoR
Посмотреть сообщение
Add this to LoadChar function ? What team etc should I use on an RP server ?

Note: LoadChar function is used to retrieve all info from MySQL database

EDIT: The callback called after clicking this spawn button is OnPlayerRequestSpawn or OnPlayerRequestClass ?
Just use those two functions in OnPlayerRequestClass. If the players data is loaded, then it is even better. You can set some parameters for the SetSpawnInfo function:

Код:
SetSpawnInfo(playerid, 0, PlayerInfo[playerid][Skin], x, y, z, facing angle, 0, 0, 0, 0, 0, 0);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)