SA-MP Forums Archive
Why this not works? - 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: Why this not works? (/showthread.php?tid=188704)



Why this not works? - Cypress - 08.11.2010

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;
}



Re: Why this not works? - LarzI - 08.11.2010

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
}



Re: Why this not works? - Cypress - 08.11.2010

Got fixed it by myself. Thanks anyway.