SA-MP Forums Archive
[SOLVED]Cant spawn Until logged in? - 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: [SOLVED]Cant spawn Until logged in? (/showthread.php?tid=100671)



[SOLVED]Cant spawn Until logged in? - [XST]O_x - 05.10.2009

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



Re: Cant spawn Until logged in? - brett7 - 05.10.2009

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

something like that


Re: Cant spawn Until logged in? - [XST]O_x - 05.10.2009

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


Re: Cant spawn Until logged in? - brett7 - 05.10.2009

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

to how you definne if someone is logged in


Re: Cant spawn Until logged in? - member - 05.10.2009

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.


Re: Cant spawn Until logged in? - [XST]O_x - 05.10.2009

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.


Re: Cant spawn Until logged in? - shady91 - 05.10.2009

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.


Re: Cant spawn Until logged in? - [XST]O_x - 05.10.2009

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


Re: Cant spawn Until logged in? - [XST]O_x - 05.10.2009

EDIT:Ow sorry nevermind..


Re: Cant spawn Until logged in? - BP13 - 05.10.2009

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