help | login before spawn - 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: help | login before spawn (
/showthread.php?tid=148634)
help | login before spawn -
rong13 - 18.05.2010
how i do it ?
Re: help | login before spawn -
Calgon - 18.05.2010
Each server can customize this action, if a server prevents it from happening - there's nothing you can do.
Re: help | login before spawn -
rong13 - 18.05.2010
u dont know how 2 do it
Re: help | login before spawn -
cAMo - 18.05.2010
There are many ways to do it. I suggest searching the forums a bit.
A common method is sending a player a dialog box
OnPlayerConnect.
Re: help | login before spawn -
biltong - 18.05.2010
IF you have your own admin script/login script, then just make a variable in the script called whatever you like, then set it to 1 when a player logs in. Then, under OnPlayerRequestSpawn, check if that variable is set to 1 for the requesting player, and if not, don't allow him to spawn.
Simple
BUT: If you're a scripting newb or have a script you're not comfortable editing or something, search around a little bit and see what comes up, I know of a few scripts that require you to login before you spawn.
Re: help | login before spawn -
rong13 - 18.05.2010
Quote:
if(IsLogged[playerid] == 0 ) {
return 0; SendClientMessage(playerid ,COLOR_RED , "You Need 2 Login For Spawn USAGE: /login [password]");
SendClientMessage(playerid ,COLOR_RED , " if You Not Register Do Register | USAGE: /register [password]");
}
|
i did try this but this dont work
i can spawn before login
Re: help | login before spawn -
Steven82 - 18.05.2010
Quote:
Originally Posted by rong13
Quote:
if(IsLogged[playerid] == 0 ) {
return 0; SendClientMessage(playerid ,COLOR_RED , "You Need 2 Login For Spawn USAGE: /login [password]");
SendClientMessage(playerid ,COLOR_RED , " if You Not Register Do Register | USAGE: /register [password]");
}
|
i did try this but this dont work
i can spawn before login
|
Well like he said, i suggest a dialog login system because you don't have to worry about all that junk
Re: help | login before spawn -
rong13 - 18.05.2010
ok so i convert my register sys 2 dialog ?
Re: help | login before spawn -
Steven82 - 18.05.2010
If you want, would take a bit, but i am sure you will understand it.
Re: help | login before spawn -
0ne - 18.05.2010
pawn Код:
#define LOGIN_BEFORESPAWN
public OnPlayerRequestSpawn(playerid)
{
#if defined LOGIN_BEFORESPAWN
if(IsLogged[playerid] == 0 )
{
return SendClientMessage(playerid,COLOR_RED,"You need to login before you spawn.");
}
#endif
return 1;
}