login question
#1

i am using ladmin4v2 and i am using the "Must Login" but all what it do is to kill the player if he spawned without login is there a way to make the player can't spawn exept when he login , here is the script :

Код:
public OnPlayerSpawn(playerid)
{
if(ServerInfo[MustLogin] == 1 && PlayerInfo[playerid][Registered] == 1 && PlayerInfo[playerid][LoggedIn] == 0)
	{
		GameTextForPlayer(playerid,"~r~Please Login Before Spawning!",4000,3);
		SetTimerEx("DelayKillPlayer", 2500,0,"d",playerid);
		return 1;
	}
return 1;
}
Код:
forward DelayKillPlayer(playerid);
public DelayKillPlayer(playerid)
{
	SetPlayerHealth(playerid,0.0);
	ForceClassSelection(playerid);
}
________
HARMED BY NEXIUM
Reply
#2

Without looking at your code, yes there certainly is a way to block the spawning.

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
  if(playerlogin == true) //will give errors but you have to create your personal statement here.
  {
    SendClientMessage(playerid,0x00FF00FF,"Logged in succesfully!");
    return 1;
  }
  else
  {
    SendClientMessage(playerid,0xFF0000FF,"You must login before spawning");
    return 0;
  }
}

If you don't have any clue howto do this in your script , let me know.

Grts Riz
Reply
#3

Bump
________
No2 vaporizer review
Reply
#4

Bump
________
Teen Health Advice
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)