The code "keeping"
#1

Hey, first sorry on my bad English.
I tried to make a register system, and I did in OnDialogResponse
PHP код:
if(strlen(inputtext) < || strlen(inputtext) > 32)
{
// This is an example
// Code
return 0;

I did return 0; and if the player didn't wrote nothing the code moving to where you're chosing the skin
Reply
#2

Код:
if(strlen(inputtext) < 4 || strlen(inputtext) > 32) 
{ 
SendClientMessage(Playerid,-1,"your password must be more than 4 characters long");
ShowPlayerDialog(playerid, blah blah);
return 0; 
}
Reply
#3

I'm saying that the dialog works perfectly, but it's moving to where player chosing the skin, with button "Spawn", did you understand..? like he can spawn with dialog On, I don't know how to explain it..
Reply
#4

I understand perfectly,I had this bug also,well just define a loggedin player variable and set its value to 1 if the player managed to login by typing a password.And if he logged in without typing anyything,then let its value stand as 0.Now you must check it on OnPlayerSpawn function,if it's 0 kick the player,otherwise,welcome message!
Reply
#5

could you help me with that, I didn't understood you..
http://pastebin.com/xXATL6kp
Reply
#6

I saw your code looks like there is a Logged variable declare wich is good,do this:
pawn Код:
public OnPlayerSpawn(playerid)
{
   if(Logged[playerid]==0) Kick(playerid); //if the player "logged in" without typing any password gets kicked
   return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)