MySQL vip for 1 month. -
Champ - 22.10.2013
I have searched but i don't find any mysql one.
Can anybody tell me how to make a vip system with a limited time of 1 month and save it in mysql database.
Thank You.
Re: MySQL vip for 1 month. -
Wizzy951 - 22.10.2013
Well, I can't make the whole script for you, but I can give you a little suggestion - use
unix timestamps for the temporary system.
Re: MySQL vip for 1 month. -
JaKe Elite - 22.10.2013
Are you talking about something like a vip with specified days, and when the day comes, the player's vip expired?
If you're talking about that, You might need to use unixtimestamp.
Re: MySQL vip for 1 month. -
Champ - 22.10.2013
how to add this system in this code below.
pawn Код:
COMMAND:makevip(playerid, params[])
{
if(GetPlayerAdminLevel(playerid) < 7) return SendClientMessage(playerid, COLOR_ORANGE, "=> You're not authorized to use this command!");
new target, level;
if(sscanf(params, "ui", target, level)) return SendClientMessage(playerid, COLOR_ORANGE, "=> Usage: /makevip [playerid/name] [level]");
else if(target == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_ORANGE, "=> Enter a valid player ID/name!");
SetPVarInt(target, "VIP", level);
new string[128], pName[MAX_PLAYER_NAME], gName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
GetPlayerName(target, gName, MAX_PLAYER_NAME);
format(string, sizeof string, "=> Admin %s has set %s VIP.", pName, gName);
SendClientMessageToAdmins(string);
format(string, sizeof string, "=> Admin %s has set your VIP level to %i.", pName, level);
SendClientMessage(target, COLOR_ROYALBLUE, string);
format(string, sizeof string, "%s set %s admin level to: %i", pName, gName, level);
Log("MakeAdmin", string);
return 1;
}
Re: MySQL vip for 1 month. -
zT KiNgKoNg - 22.10.2013
If you don't understand how to use Unix Timestamps then i suggest you post a reply on one of the six script request threads or look for a filterscript since i know there is one somewhere on the forums, just can't find it for you at this current time.
Re: MySQL vip for 1 month. -
JaKe Elite - 22.10.2013
go to ___'s tutorial, He create a whole explanation about Unix Timestamp.
Re: MySQL vip for 1 month. -
iJumbo - 22.10.2013
You have to check if he is vip maybe every connection or where you want.. you need to create a query by saving the current date plus one month after which uses another query to check if the current date is greater than the date that you saved
Re: MySQL vip for 1 month. -
[ABK]Antonio - 22.10.2013
Ehh, I just made one that checks if day > daylastintxtfile days++ then save that (along with the getdate day). Then again, I only did that so they didn't lose VIP days if the server was down for an entire day.