Vip time.
#1

Hi visitors. I have one question. I don't know how to do,in my mysql database,when i go look for player,i get how much time left,until he lost vip,i do that succeful,when player connect,and with command,can see how much time left until he lose vip,but i don't know,how to do that in mysql,when i everytime come,time will change.
Reply
#2

Write it into a variable upon login, and then just show the variable in a string?

pawn Код:
CMD:viptime(playerid, input[])
{
if(!IsPlayerAdmin(playerid)) return 0;
new id;
if(sscanf(input, "u", id)) return SendClientMessage(playerid, color, "use /viptime [id]");

new str[128]; // I know this might be too big, didn't care to count.
new name[MAX_PLAYER_NAME]; GetPlayerName(id, name, MAX_PLAYER_NAME);
format(str, sizeof(str), "Player %s got %d minutes left of his VIP time.", name, VIPtime[id]);
SendClientMessage(playerid, color, str);
return 1;
}
Reply
#3

I say in my first post,i have do command. I don't want to go to server,and write that command...I say i want check that in datebase,not in server...
Reply
#4

Have a field in the database that stores how many MINUTES they've played. If they have to play for 60 minutes (an hour) do this:

Time left = 60-minutes_played
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)