SA-MP Forums Archive
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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Spawn (/showthread.php?tid=123106)



Spawn - maltheus. - 24.01.2010

How to make when player join server he cant spawn before he dont /login?
I use ladmin


Re: Spawn - [dN]Eagle - 24.01.2010

Код:
	if(gPlayerLogged[playerid] == 0)
	{
  	SendClientMessage(playerid, your color, "Please login before spawning.");
    	 ForceClassSelection(playerid);
    	 SetPlayerHealth(playerid,0);
 	}



Re: Spawn - Karlip - 24.01.2010

^or use the function OnPlayerRequestSpawn


Re: Spawn - maltheus. - 24.01.2010

Quote:

if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, your color, "Please login before spawning.");
ForceClassSelection(playerid);
SetPlayerHealth(playerid,0);
}

Under what i need add that?




Re: Spawn - [dN]Eagle - 24.01.2010

public OnPlayerSpawn


Re: Spawn - maltheus. - 24.01.2010

Quote:

C:\DOCUME~1\otto\Desktop\Server\GAMEMO~1\FFFFFFF.p wn(1745) : error 017: undefined symbol "gPlayerLogged"
C:\DOCUME~1\otto\Desktop\Server\GAMEMO~1\FFFFFFF.p wn(1745) : warning 215: expression has no effect
C:\DOCUME~1\otto\Desktop\Server\GAMEMO~1\FFFFFFF.p wn(1745) : error 001: expected token: ";", but found "]"
C:\DOCUME~1\otto\Desktop\Server\GAMEMO~1\FFFFFFF.p wn(1745) : error 029: invalid expression, assumed zero
C:\DOCUME~1\otto\Desktop\Server\GAMEMO~1\FFFFFFF.p wn(1745) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.




Re: Spawn - LuxurioN™ - 24.01.2010

Try this (Not Tested):

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    // Request Login
    if(VERIFY IF PLAYER IS NOT LOGGED HERE (Ex: AccInfo[playerid][Logged] == 0){
    SendClientMessage(playerid,COLOR_HERE,"You are not logged! (Use: /login [Password]");
    return 0;
    }
    return 1;
    }



Re: Spawn - maltheus. - 25.01.2010

i get errors on
Quote:

if(VERIFY IF PLAYER IS NOT LOGGED HERE (Ex: AccInfo[playerid][Logged] == 0){