help | login before spawn
#1

how i do it ?
Reply
#2

Each server can customize this action, if a server prevents it from happening - there's nothing you can do.
Reply
#3

u dont know how 2 do it
Reply
#4

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.
Reply
#5

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.
Reply
#6

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
Reply
#7

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
Reply
#8

ok so i convert my register sys 2 dialog ?
Reply
#9

If you want, would take a bit, but i am sure you will understand it.
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)