login help can you help me fast
#1

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

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.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)