SA-MP Forums Archive
login help can you help me fast - 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 help can you help me fast (/showthread.php?tid=236070)



login help can you help me fast - boyan96 - 06.03.2011

How do I do if someone has not logged it put in jail and log him put on somewhere


Re: login help can you help me fast - Lorrden - 06.03.2011

pawn Код:
//OnTop
new pLogged[MAX_PLAYERS];
new pLoginJailed[MAX_PLAYERS];

//OnPlayerConnect
pLogged[playerid] = 0; // The player isn't logged in
pLoginJailed[playerid] = 0; // The player isn't login jailed

//OnYourLoginFuncition
pLogged[playerid] = 1; // The player is logged in
if(pLoginJailed[playerid] == 1) SpawnPlayer(playerid);

public OnPlayerSpawn(playerid)
{
    if(pLogged[playerid] == 0) // If the player isn't logged in
    {
        SetPlayerPos(playerid, x, y, z); // Get the X, Y, Z coordinates for Jail
        SetPlayerInterior(playerid, interiorid); // Get the interior id for jail
        SetPlayerVirtualWorld(playerid, worldid); // Get the Virtual world id for jail
        SetCameraBehindPlayer(playerid);
        SetPlayerFacingAngle(playerid, rotation); // Get the rotation/facing angle You wish the player to spawn with in jail
        return GameTextForPlayer(playerid, "You have to login", 3000, 3);
    }
    //if the player is logged in
    return true;
}
That's how.
Next time, use the SEARCH button.