SA-MP Forums Archive
Easy 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: Easy Question! (/showthread.php?tid=65160)



Easy Question! - harrold - 10.02.2009

Hi all
How can i do this?
A player joins and select a class but he can't press shift to spawn
He must login first then he can spawn HOW>?


Re: Easy Question! - Think - 10.02.2009

Quote:
Originally Posted by harrold
Hi all
How can i do this?
A player joins and select a class but he can't press shift to spawn
He must login first then he can spawn HOW>?
/register or /login ? post it on the servers forum lol


Re: Easy Question! - ICECOLDKILLAK8 - 10.02.2009

Either kick them if they Spawn or Force Class Selection and kill em


Re: Easy Question! - harrold - 10.02.2009

No i want he can't spawn if he don't login NO KICK


Re: Easy Question! - Jefff - 10.02.2009

Код:
public OnPlayerRequestSpawn( playerid )
{
  if (file exist && !Logged[playerid]){
  GameTextForPlayer(playerid, "~r~Log In kid, before spawn !!!",1000,3);
    return 0;
  }else
    return 1;
}
file exist - account of player


Re: Easy Question! - harrold - 10.02.2009

Ok thanks ^^
Oh what's a good sound id to warn the player to log in?


Re: Easy Question! - ICECOLDKILLAK8 - 10.02.2009

Quote:
Originally Posted by harrold
No i want he can't spawn if he don't login NO KICK
1) Chill out
2) Sending them a message wont do jack shit, They can still spawn, I was suggesting an option to stop them from spawning if they do press shift


Re: Easy Question! - harrold - 10.02.2009

And how you wanna do?


Re: Easy Question! - ICECOLDKILLAK8 - 10.02.2009

Quote:
Originally Posted by harrold
And how you wanna do?
What, If you do what i said then in OnPlayerSpawn if they aint logged in then ForceClassSelection and kill em which means it will take them back to the Char selection screen


Re: Easy Question! - Joe Staff - 10.02.2009

public OnPlayerRequestSpawn( playerid )
{
if((GetPlayerSkin(playerid)==WHATEVERSKIN) && !PlayerAdmin[playerid])
{
ForcePlayerClassSelection(playerid);
SpawnPlayer(playerid);
}
return 1;
}

smells like it would work to me