Login Befour You Can Spawn?
#1

im using ladmin2 and how do i make it so you MUST Login befour u can spawn?


heres my onplayer spawn code

public OnPlayerSpawn(playerid)
{

if(PlayerInfo[playerid][LoggedIn] == 1){
GameTextForPlayer(playerid,"Have Fun!",3000,1);
SpawnPlayer(playerid);
} else {
GameTextForPlayer(playerid,"~r~YOU MUST LOGIN BEFOUR SPAWN",4000,0); }
}
}




and i get theses errors


C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(374) : warning 217: loose indentation
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(377) : error 054: unmatched closing brace ("}")
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(379) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(381) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(386) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(392) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(393) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(394) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(396) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(402) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(404) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(40 : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(411) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(422) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(48 : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(4279) : warning 203: symbol is never used: "BuyCar"
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(4279) : warning 203: symbol is never used: "ChangeMenu"
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(4279) : warning 203: symbol is never used: "CloseMenu"
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(4279) : warning 203: symbol is never used: "dcmd_lcredits"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


13 Errors.


PLZ HELP THX
Reply
#2

Set ''0'' to ''1'' in most admin scripts.
Reply
#3

Quote:
Originally Posted by Andy_McKinley
Посмотреть сообщение
Set ''0'' to ''1'' in most admin scripts.
i get theses

C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(374) : warning 217: loose indentation
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(377) : error 054: unmatched closing brace ("}")
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(379) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(381) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(386) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(392) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(393) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(394) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(396) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(402) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(404) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(40 : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(411) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(422) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(48 : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(4279) : warning 203: symbol is never used: "BuyCar"
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(4279) : warning 203: symbol is never used: "ChangeMenu"
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(4279) : warning 203: symbol is never used: "CloseMenu"
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(4279) : warning 203: symbol is never used: "dcmd_lcredits"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


13 Errors.
Reply
#4

prob u need another } at last


try this
pawn Код:
public OnPlayerSpawn(playerid)
{
    if(PlayerInfo[playerid][LoggedIn] == 1)
    {
        GameTextForPlayer(playerid,"Have Fun!",3000,1);
        SpawnPlayer(playerid);
    }
    else
    {
        GameTextForPlayer(playerid,"~r~YOU MUST LOGIN BEFOUR SPAWN",4000,0);
    }
    return 1;
}
Reply
#5

just tryed that and it got rid of 1error now it says



C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(381) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(383) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(38 : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(394) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(395) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(396) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(39 : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(404) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(406) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(410) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(413) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(424) : error 010: invalid function or declaration
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(490) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(4281) : warning 203: symbol is never used: "BuyCar"
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(4281) : warning 203: symbol is never used: "ChangeMenu"
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(4281) : warning 203: symbol is never used: "CloseMenu"
C:\Users\Stephen\Desktop\serv\filterscripts\ladmin 2.pwn(4281) : warning 203: symbol is never used: "dcmd_lcredits"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


12 Errors.
Reply
#6

look at my edit up ..
Reply
#7

Quote:
Originally Posted by gigi1223
Посмотреть сообщение
look at my edit up ..
add my msn? garystep@hotmail.co.uk
Reply
#8

Jesus.. Use OnPlayerRequestSpawn instead.
Reply
#9

wtf is this..

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(PlayerInfo[playerid][LoggedIn] == 1)
    {
        GameTextForPlayer(playerid,"Have Fun!",3000,1);
        SpawnPlayer(playerid);
    }
    else
    {
        GameTextForPlayer(playerid,"~r~YOU MUST LOGIN BEFOUR SPAWN",4000,0);
    }
    return 1;
}
should be

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(PlayerInfo[playerid][LoggedIn] == 1)
    {
        GameTextForPlayer(playerid,"~g~Have Fun!",3000,1);
        SetPlayerHealth(playerid,0.0);
        ForceClassSelection(playerid); //if you use dialogs then put them on oprc
    }
    else
    {
        GameTextForPlayer(playerid,"~r~YOU MUST LOGIN BEFOUR SPAWN",4000,6);
    }
    return 1;
}
Reply
#10

Quote:
Originally Posted by [FU]Victious
Посмотреть сообщение
wtf is this..

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(PlayerInfo[playerid][LoggedIn] == 1)
    {
        GameTextForPlayer(playerid,"Have Fun!",3000,1);
        SpawnPlayer(playerid);
    }
    else
    {
        GameTextForPlayer(playerid,"~r~YOU MUST LOGIN BEFOUR SPAWN",4000,0);
    }
    return 1;
}
should be

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(PlayerInfo[playerid][LoggedIn] == 1)
    {
        GameTextForPlayer(playerid,"~g~Have Fun!",3000,1);
        SetPlayerHealth(playerid,0.0);
        ForceClassSelection(playerid); //if you use dialogs then put them on oprc
    }
    else
    {
        GameTextForPlayer(playerid,"~r~YOU MUST LOGIN BEFOUR SPAWN",4000,6);
    }
    return 1;
}
that will just kill the player everytime he spawns?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)