Registered account
#1

Hi all,i've a serious issue.

In my gm,everyone can play with the choosen name,i need to "If you arent logged,you cant spawn".

This is the variable i use for check login:

Код:
 if(IsLogged[playerid] == 1)
		{
// Logged In

Код:
 if(IsLogged[playerid] == 0)
		{
// Logged Out
Reply
#2

Is the Logged Out under OnPlayerRequestSpawn?
Reply
#3

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(IsLogged[playerid] == 0)
   {
      SendClientMessage(playerid, 0xB7FFFF, "You can't spawn yet");
      SetPlayerHealth(playerid, 0.0);
      ForceClassSelection(playerid);
   }
    return 1;
}
pawn Код:
public OnPlayerDisconnect(playerid,reason);
{
   IsLogged[playerid]=0;
   return 1;
}
Reply
#4

Quote:
Originally Posted by blackwave
Посмотреть сообщение
pawn Код:
public OnPlayerSpawn(playerid)
{
    if(IsLogged[playerid] == 0)
   {
      SendClientMessage(playerid, 0xB7FFFF, "You can't spawn yet");
      SetPlayerHealth(playerid, 0.0);
      ForceClassSelection(playerid);
   }
    return 1;
}
pawn Код:
public OnPlayerDisconnect(playerid,reason);
{
   IsLogged[playerid]=0;
   return 1;
}
its more easy with this

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if (LoggedIn[playerid] == 0) return SendClientMessage(playerid,COLOR_RED,"ERROR: You must log in before playing !");
    return 1;
}
Only 2 lines and no players harmed.
Reply
#5

Thanks guys for the fast reply.Always the best!
Reply
#6

Quote:
Originally Posted by admantis
Посмотреть сообщение
its more easy with this

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if (LoggedIn[playerid] == 0) return SendClientMessage(playerid,COLOR_RED,"ERROR: You must log in before playing !");
    return 1;
}
Only 2 lines and no players harmed.
It's return 0; there. So it prevents hom for spawning.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)