21.06.2016, 14:37
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
pleazse tell me how
#define MINUTES 10 // 10 Minutes.
#define MILISECONDS MINUTES * 60
new
RegisterTime[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
RegisterTime[playerid] = gettime() + MILISECONDS;
return 1;
}
CMD:register(playerid, params[])
{
if(RegisterTime[playerid] >= gettime())
{
new Str[128]; format(Str, 128, "REGISTER: You are no able to use this command at this point. Wait %d seconds.", RegisterTime[playerid] - gettime());
return SendClientMessage(playerid, -1, Str);
}
// Proceed to register the player..
return 1;
}