No talking/spawning until logging in..?
#2

is strange, your enum should include a register

pawn Код:
enum PlayerInfo {
  gName,
  Registered,
  Password,
  Level,
  Regged,
  Logged,
  Money,
  Kills,
  Deaths,
}
under OnPlayerRequestSpawn

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
   
        if (    PlayerInfo[playerid][Logged] == 0 &&PlayerInfo[playerid][Registered] == 1 )
        {
          SendClientMessage(playerid,red,"Your Account Is registered , you have to login before spawn!");
          return 0;//when it returns 0 it doesnt let the player spawn!
        }
    return 1;
}
under OnPlayerText
pawn Код:
public OnPlayerText(playerid, text[])
{
   

  if (PlayerInfo[playerid][Registered] == 1 && PlayerInfo[playerid][Logged]== 0)
    {
      SendClientMessage(playerid, red, "Your account is Registered , Login in order to talk!");
      return 0;//same as onplayerrequestspawn
    }
well , also you should make that when player registers
PlayerInfo[playerid][Registered] =1;
and when player loggins
PlayerInfo[playerid][Logged]=1;
Reply


Messages In This Thread
No talking/spawning until logging in..? - by _Vortex - 06.09.2009, 21:28
Re: No talking/spawning until logging in..? - by HuRRiCaNe - 06.09.2009, 21:43
Re: No talking/spawning until logging in..? - by Hiitch - 06.09.2009, 23:34
Re: No talking/spawning until logging in..? - by gemadon - 07.09.2009, 00:30
Re: No talking/spawning until logging in..? - by SanMarinoRP - 07.09.2009, 00:40

Forum Jump:


Users browsing this thread: 1 Guest(s)