Disabaling Spawn Before Registering
#1

How would i disable the player on spawning before he registers?, like what command or function can i use for that ?
Reply
#2

Quote:
Originally Posted by will_92
How would i disable the player on spawning before he registers?, like what command or function can i use for that ?
You can use Kick(playerid); like
public OnPlayerSpawn(playerid)

Код:
	if(gPlayerLogged[playerid] == 0)
	{
         Kick(playerid);
 	}
Reply
#3

no , i don't want to kick i want to disable player from entering the game if he doesn't register or login
Reply
#4

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
  if(!isLogged[playerid]) return 0;
  return 1;
}
Reply
#5

Quote:
Originally Posted by CrαcK
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
  if(!isLogged[playerid]) return 0;
  return 1;
}
you are faster
Reply
#6

It don't work ?!?!
Reply
#7

okay make this at the top of script

pawn Код:
new Registed[MAX_PLAYERS];
then in your OnPlayerConnect put

pawn Код:
Registed[playerid] = 0;
then with your /register and/or /login command

place

pawn Код:
Registed[playerid] = 1;
then OnPlayerRequestSpawn

pawn Код:
if(Registed[playerid] == 0)
{
SendClientMessage(playerid,RED,"ERROR: Please register/login first!");
return 0;
}
Reply
#8

k , that's not even close
Reply
#9

Do you have an admin script. If yes, show it. So that we actually KNOW how it works so that we can create a WORKING fix
Reply
#10

gAdmin has it built in you just have to change a value in a script file from 0 to 1 somewhere.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)