login question - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: login question (
/showthread.php?tid=129232)
login question -
aircombat - 21.02.2010
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
Re: login question -
Rizard - 21.02.2010
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
Re: login question -
aircombat - 21.02.2010
Bump
________
No2 vaporizer review
Re: login question -
aircombat - 22.02.2010
Bump
________
Teen Health Advice