Registration After 10mins
#1

Hello Guys Can i make a registration system that allow player to register a new account after playing on the server for 10 min

pleazse tell me how
Reply
#2

Not to be rude to you but this section for "Scripting Help" which means you post your code with problems and we help you find a solution for it, not to script for you.
Reply
#3

Does i have to give u onplayerconnect
Reply
#4

If you want it to automatically show the player the registration dialog after 10 minutes, set a timer once they connect with an interval of 600000.
If you want it to be a command, create a player variable or use PVars, and set its value to the current timestamp ( gettime() ) and then check if 600 seconds have passed.
Reply
#5

I Want To Do The Second Option Can u Help Me in Scripting It Stinged
Reply
#6

I Am Not Having A Register Command In My Script
Reply
#7

This is an example.

PHP код:
#define MINUTES 10 // 10 Minutes.
#define MILISECONDS MINUTES * 60
new
    
RegisterTime[MAX_PLAYERS];
public 
OnPlayerConnect(playerid)
{
    
RegisterTime[playerid] = gettime() + MILISECONDS;
    return 
1;
}
CMD:register(playeridparams[])
{
    if(
RegisterTime[playerid] >= gettime())
    {
        new 
Str[128]; format(Str128"REGISTER: You are no able to use this command at this point. Wait %d seconds."RegisterTime[playerid] - gettime());
        return 
SendClientMessage(playerid, -1Str);
    }
    
// Proceed to register the player..
    
    
return 1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)