Why this not works?
#1

This function is for registered accounts.So if the account is registered player must login before spawn. Its not working. I can spawn normally without login.

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    #if defined mustlogin
    if(ServerInfo[MustLogin] == 1 && PlayerInfo[playerid][Registered] == 1 && PlayerInfo[playerid][LoggedIn] == 0){
    SendClientMessage(playerid,COLOR_LRED,"Registered account. Please type /login [password]");
    return 0;}
    #endif
    return 1;
}
Reply
#2

You are completely sure you've defined "mustlogin" previously?

If so; try doing:
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    #if defined mustlogin
    if(ServerInfo[MustLogin] == 1 && PlayerInfo[playerid][Registered] == 1 && PlayerInfo[playerid][LoggedIn] == 0){
    SendClientMessage(playerid,COLOR_LRED,"Registered account. Please type /login [password]");
    return 0;}
    #else
    return 1;
    #endif
}
Reply
#3

Got fixed it by myself. Thanks anyway.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)