My Register System Problem
#1

Hello Guys I have Made A System that a Player Can Only Register A Account If He Had Played On The Server for 10 Min.The Command Is Doing his Work Properly It Don't Allow people To Register Before 10 mins of connect.But i Am Having A Problem That If A Player Don't Register After 10 mins The Script Makes His Account In Scriptfile.

What Should I Show u To Fix It Please Tell Me i Will Give u the Code
Reply
#2

Under OnPlayerDisconnect, or wherever you save account function is called,
create a 'if' statement for if he's a registered member or not.
I.E
PHP код:
//Global
new boolIsRegAcct[MAX_PLAYERS];
if(
IsRegAcct[playerid] == true)
{
   
// SAVE ACCOUNT

Also don't forget after the player registers(If they do) to turn the Boolean to true.

PHP код:
/* THIS IS A EXAMPLE
    THIS EXACT CODE WILL NOT WORK AT FACE VALUE
*/
CMD:register(playeridparams[])
{
    if(!
IsRegAcct[playerid] == true
    {
        if(
GetPVarInt(playerid#AllowedAcct) == 1)
        
{
            
IsRegAcct[playerid] = true;
        }
    }
    return 
true;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)