Spawning after Register/Login
#1

Basicly I'm creating my own Roleplay Gamemode atm., and I just want to know how to make a player spawn right after he/she is logged in? I've been searhing around SA-MP Forum, but I had no luck.

Anyway, Thanks for the help!
Reply
#2

Код:
public OnPlayerRequestSpawn(playerid)
{
	if(udb_Exists(PlayerName(playerid)) && !PLAYERLIST_authed[playerid])
 	{
	GameTextForPlayer(playerid,"~w~ THIS PLAYER NAME IS REGISTERED~n~~r~!- YOU ARE NOT LOGGED IN -!~n~~w~ USE ~g~/LOGIN (PASSWORD)",5000,3);
	return 0;
	}
	if(!udb_Exists(PlayerName(playerid)) && !PLAYERLIST_authed[playerid])
	{
	GameTextForPlayer(playerid,"~w~ PLAYER NAME NOT REGISTERED~n~~r~!- YOU ARE NOT REGISTERED -!~n~~w~ USE ~g~/REGISTER (PASSWORD)",5000,3);
	return 0;
	}
	return 1;
}
for dudb system.
Reply
#3

Quote:
Originally Posted by billiout
Код:
public OnPlayerRequestSpawn(playerid)
{
	if(udb_Exists(PlayerName(playerid)) && !PLAYERLIST_authed[playerid])
 	{
	GameTextForPlayer(playerid,"~w~ THIS PLAYER NAME IS REGISTERED~n~~r~!- YOU ARE NOT LOGGED IN -!~n~~w~ USE ~g~/LOGIN (PASSWORD)",5000,3);
	return 0;
	}
	if(!udb_Exists(PlayerName(playerid)) && !PLAYERLIST_authed[playerid])
	{
	GameTextForPlayer(playerid,"~w~ PLAYER NAME NOT REGISTERED~n~~r~!- YOU ARE NOT REGISTERED -!~n~~w~ USE ~g~/REGISTER (PASSWORD)",5000,3);
	return 0;
	}
	return 1;
}
for dudb system.
I know that - but I want it to spawn right after you logged in. So you doesn't have the option to choose a skin. It will pick one randomly for you. (I already created that - Just need to know how to skip the class selection)
Reply
#4

Код:
public OnPlayenrConnect(playerid)
{
  if (PLAYERLIST_authed[playerid])
  {
   SpawnPlayer(playerid);
  }
}
im not sure.
Reply
#5

Quote:
Originally Posted by billiout
Код:
public OnPlayenrConnect(playerid)
{
 if (PLAYERLIST_authed[playerid])
 {
   SpawnPlayer(playerid);
 }
  return 1;
}
im not sure.
Reply
#6

If I then use SpawnPlayer(playerid); - will it then spawn with the Player ID 0?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)