06.03.2011, 20:41
How do I do if someone has not logged it put in jail and log him put on somewhere
//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;
}