[SOLVED]Cant spawn Until logged in?
#1

Hey,
I'm trying to script a little for 0.3,So i dont know if i should post it here or on "0.3 Scripting" board..
Anyway,can someone show me how i can make something like,that the player spawn until he logs in?
I've done my /register+/login command by the tutorial from bogeyman_EST.
Thanks in advance.

EDIT:
I Solved it thanks to you guys,here is The solution If someone want it and dont know how:
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if (logged[playerid] == 0) return 0;
    {
    if (logged[playerid] == 1) return 1;
    }
    return 1;
}
Reply
#2

public OnPlayerRequestSpawn(playerid)
{
if(!loggedin[playerid])
{
Sendclientmessage(colour, "you must login");
return 0;
}
return 1;
}

something like that
Reply
#3

Quote:
Originally Posted by brett7
public OnPlayerRequestSpawn(playerid)
{
if(!loggedin[playerid])
{
Sendclientmessage(colour, "you must login");
return 0;
}
return 1;
}

something like that
Hmm..
Код:
C:\Users\Avi\Desktop\0.3 server\gamemodes\Test.pwn(144) : error 017: undefined symbol "loggedin"
C:\Users\Avi\Desktop\0.3 server\gamemodes\Test.pwn(144) : warning 215: expression has no effect
C:\Users\Avi\Desktop\0.3 server\gamemodes\Test.pwn(144) : error 001: expected token: ";", but found "]"
C:\Users\Avi\Desktop\0.3 server\gamemodes\Test.pwn(144) : error 029: invalid expression, assumed zero
C:\Users\Avi\Desktop\0.3 server\gamemodes\Test.pwn(144) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Thanks for trying to help anyway
Reply
#4

you have to change this bit if(!loggedin[playerid])

to how you definne if someone is logged in
Reply
#5

As breet7 said, you should change loggedin[playerid] to the variable u are using. Anyways, I think u are using this "logged[playerid]" variable from lookning at bogeyman_EST's tutorial.

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(logged[playerid] == 0) return SendClientMessage(playerid, 0xFF0000AA, "you must login");
    return 1;
}
Good Luck.
Reply
#6

Quote:
Originally Posted by [B2K
Hustler ]
As breet7 said, you should change loggedin[playerid] to the variable u are using. Anyways, I think u are using this "logged[playerid]" variable from lookning at bogeyman_EST's tutorial.

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(logged[playerid] == 0) return SendClientMessage(playerid, 0xFF0000AA, "you must login");
    return 1;
}
Good Luck.
Thanks dude worked
Brett said that i need to go by the define,but i looked at the tut,there is no define,he didnt mention by the variable.
Reply
#7

Quote:
Originally Posted by [B2K
Hustler ]
As breet7 said, you should change loggedin[playerid] to the variable u are using. Anyways, I think u are using this "logged[playerid]" variable from lookning at bogeyman_EST's tutorial.

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(logged[playerid] == 0) return SendClientMessage(playerid, 0xFF0000AA, "you must login");
    return 1;
}
Good Luck.
i wouldn't add the message as if they hold down spawn button it will spam them with the message.
Reply
#8

Quote:
Originally Posted by Shady91
Quote:
Originally Posted by [B2K
Hustler ]
As breet7 said, you should change loggedin[playerid] to the variable u are using. Anyways, I think u are using this "logged[playerid]" variable from lookning at bogeyman_EST's tutorial.

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(logged[playerid] == 0) return SendClientMessage(playerid, 0xFF0000AA, "you must login");
    return 1;
}
Good Luck.
i wouldn't add the message as if they hold down spawn button it will spam them with the message.
EDIT:
No spam problem,worse problem -.-'
it's spawning the player,AND sends "You must login".
o_O
Reply
#9

EDIT:Ow sorry nevermind..
Reply
#10

Quote:
Originally Posted by ►ϻozilla Fir3foж◄
EDIT:Ow sorry nevermind..
how did you fix it? mine shows it saying this is not registered. but it still spawns you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)