Mysql timers
#2

Quote:
Originally Posted by zT KiNgKoNg
Посмотреть сообщение
I know its not the most descriptive title, But its something...
So i need to make a system that lets say a player uses /rp (ECT: Rep player) it adds a time stamp to database `rep` with the name of the player lets sat `Bob Marston` and a timestamp that i can then use ingame to stop the player using the example command for lets say an hour even if he/she leaves the server.


I've been looking around but nothing seems to solve this problem :P
Reference:
https://sampforum.blast.hk/showthread.php?tid=129183
For more info read this link.

Код:
new string[256];
new stamp;
stamp = gettime();
format(string,sizeof(string),"INSERT INTO `rep` (`username`, `stamp`) VALUES ('%s', '%i')",PlayerName, stamp);
mysql_query(string);
and for check part:

Код:
new string[256];
format(string,sizeof(string),"SELECT `stamp` FROM `rep` WHERE `username` = '%s'",PlayerName);
mysql_query(string);
Reply


Messages In This Thread
Mysql timers - by zT KiNgKoNg - 18.04.2013, 20:42
Re: Mysql timers - by Azazelo - 18.04.2013, 21:05
Re: Mysql timers - by zT KiNgKoNg - 18.04.2013, 21:09
Re: Mysql timers - by Azazelo - 18.04.2013, 21:21

Forum Jump:


Users browsing this thread: 1 Guest(s)