[SOLVED]Login before spawn
#1

Is there any script that blocks registered people before spawn (that noone can use otherґs accounts), if they arenґt logged in?

So that comes: You arenґt logged in yet, so you canґt spawn. Type /login to login now.

Possible? Greetz,
Jeffry
Reply
#2

pawn Код:
//OnPlayerRequestClass
if(Logged[playerid] == false) return false;
Reply
#3

Quote:
Originally Posted by Jeffry
Is there any script that blocks registered people before spawn (that noone can use otherґs accounts), if they arenґt logged in?

So that comes: You arenґt logged in yet, so you canґt spawn. Type /login to login now.

Possible? Greetz,
Jeffry
Depends on what script you are using?
You probably have a variable called Logged or Loggedin, then you can make below onplayerrequestspawn

pawn Код:
if (Logged[playerid] == 0)
{
SendClientMessage(playerid, 0xffffffff, "First login before you can spawn");
}
else
{
SendClientMessage(playerid, 0xffffffff, "You haven't loggedin yet, first login before you spawn")
Kick(playerid);
}
Reply
#4

Quote:
Originally Posted by dirkblok
pawn Код:
if (Logged[playerid] == 0)
{
SendClientMessage(playerid, 0xffffffff, "First login before you can spawn");
}
else
{
SendClientMessage(playerid, 0xffffffff, "You haven't loggedin yet, first login before you spawn")
Kick(playerid);
}
So, if variable Logged isn't 0 (it's 1 probably?), you will kick the player?

And also this won't work for the first statement, you need to return 0.
Reply
#5

Quote:
Originally Posted by ♣ ⓐⓢⓢ
pawn Код:
//OnPlayerRequestClass
if(Logged[playerid] == false) return false;
Under OnPlayerRequestSpawn, else he won't be able to chose skins
Reply
#6

Quote:
Originally Posted by dice7
Quote:
Originally Posted by ♣ ⓐⓢⓢ
pawn Код:
//OnPlayerRequestClass
if(Logged[playerid] == false) return false;
Under OnPlayerRequestSpawn, else he won't be able to chose skins
Ah right, hard to remind all these old things
Reply
#7

Erm, im using a Filterscript which includes the register system. When i add this, some errors appear.


pawn Код:
C:\Users\Patrick und Marco\Desktop\Pawn\filterscripts\ladmin4v2.pwn(665) : warning 217: loose indentation
C:\Users\Patrick und Marco\Desktop\Pawn\filterscripts\ladmin4v2.pwn(676) : warning 217: loose indentation
C:\Users\Patrick und Marco\Desktop\Pawn\filterscripts\ladmin4v2.pwn(677) : warning 217: loose indentation
C:\Users\Patrick und Marco\Desktop\Pawn\filterscripts\ladmin4v2.pwn(773) : warning 217: loose indentation
C:\Users\Patrick und Marco\Desktop\Pawn\filterscripts\ladmin4v2.pwn(925) : error 017: undefined symbol "Logged"
C:\Users\Patrick und Marco\Desktop\Pawn\filterscripts\ladmin4v2.pwn(925) : warning 215: expression has no effect
C:\Users\Patrick und Marco\Desktop\Pawn\filterscripts\ladmin4v2.pwn(925) : error 001: expected token: ";", but found "]"
C:\Users\Patrick und Marco\Desktop\Pawn\filterscripts\ladmin4v2.pwn(925) : error 029: invalid expression, assumed zero
C:\Users\Patrick und Marco\Desktop\Pawn\filterscripts\ladmin4v2.pwn(925) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Now?
Reply
#8

Quote:
Originally Posted by Jeffry
Erm, im using a Filterscript which includes the register system. When i add this, some errors appear.


pawn Код:
C:\Users\Patrick und Marco\Desktop\Pawn\filterscripts\ladmin4v2.pwn(665) : warning 217: loose indentation
C:\Users\Patrick und Marco\Desktop\Pawn\filterscripts\ladmin4v2.pwn(676) : warning 217: loose indentation
C:\Users\Patrick und Marco\Desktop\Pawn\filterscripts\ladmin4v2.pwn(677) : warning 217: loose indentation
C:\Users\Patrick und Marco\Desktop\Pawn\filterscripts\ladmin4v2.pwn(773) : warning 217: loose indentation
C:\Users\Patrick und Marco\Desktop\Pawn\filterscripts\ladmin4v2.pwn(925) : error 017: undefined symbol "Logged"
C:\Users\Patrick und Marco\Desktop\Pawn\filterscripts\ladmin4v2.pwn(925) : warning 215: expression has no effect
C:\Users\Patrick und Marco\Desktop\Pawn\filterscripts\ladmin4v2.pwn(925) : error 001: expected token: ";", but found "]"
C:\Users\Patrick und Marco\Desktop\Pawn\filterscripts\ladmin4v2.pwn(925) : error 029: invalid expression, assumed zero
C:\Users\Patrick und Marco\Desktop\Pawn\filterscripts\ladmin4v2.pwn(925) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Now?
Be Sure That Your Register System Uses Logged variable and no another one... And there are some syntaxis errors, its simple to correct it...
Reply
#9

Lol, simple, can you tell me how?
Reply
#10

the Logged variable was just an example
you need to use the variable you use!
open your admin script and search for a varaible which is called similar
and put the correct code in OnPlayerRequestSpawn

pawn Код:
if(YOUR_LOGGED_VARIABLE[playerid] == false) return !SendClientMessage(playerid, 0xffffffff, "First login before you can spawn");
If you use any admin fs and cant find the right variable, ask in the admin fs topic for it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)