- 0
Inregistrarea activitatii stafului
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
Jimmi
Problema intalnita (descriere):Am incercat sa fac un sistem care memoreaza activitatea staff-ului.
Ero(area / rile) / warning-(ul / urile):Nu stiu cum sa fac ca comanda /showstaffactivity sa puna punctul la comenzile executate.
Liniile de cod / sursa / script-ul(obligatoriu):
//========================================[CMD /SHOWSTAFFACTIVITY]============================================// CMD:showstaffactivity(playerid, params[]) { if(IsPlayerConnected(playerid)) { new jucator; if(sscanf(params, "u", jucator)) return SendClientMessage(playerid, COLOR_GRAD2, "{00FF00}Folosire:{FFFFFF} /showstaffactivity [PlayerID/PartOfName]"); new str[255+1], players[MAX_PLAYER_NAME]; GetPlayerName(jucator, players, sizeof(players)); format(str, sizeof(str), "{FFFFFF}Activitatea lui %s", players); ShowPlayerDialog(playerid, 9, DIALOG_STYLE_MSGBOX, str, "/opr\t0 ori\n/cpr\t0 ori\n /unfreeze\t0 ori\n/setint\t0 ori\n/setvw\t0 ori\n/mute\t0 ori\n/mutereport\t0 ori\n/cc\t0 ori\n/respawn\t0 ori\n/slap\t0 ori\n/spec\t0 ori\n/setjob\t0 ori\n/kick\t0 ori\n/ban\t0 ori\n/goto\t0 ori\n/jail\t0 ori","Close",""); } return 1; }si
stock RegEx() { new fx[24],a,b,c,d,e,f; gettime(a,b,c); getdate(d,e,f); format(fx, sizeof(fx), "%02d/%02d/%02d - %02d:%02d:%02d", f,e,d,a,b,c); return fx; } stock SaveExecCMDS(playerid, const string[], &str) { new xquery[255], uns[MAX_PLAYER_NAME]; GetPlayerName(playerid, uns, sizeof(uns)); format(xquery, sizeof(xquery), "INSERT INTO `logExecCmds`(`Player`, `Command`, `DateTime`, `ECount`) VALUES ('%s','%s','%s','%d')", uns, string, RegEx(), str); mysql_query(xquery); return 1; }la fel si structura in care am construit in baza de date:
-- phpMyAdmin SQL Dump -- version 4.1.14.8 -- http://www.phpmyadmin.net -- -- Host: 93.119.26.250:3306 -- Generation Time: 12 Iun 2015 la 23:07 -- Server version: 5.5.39-36.0-log -- PHP Version: 5.4.36 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Database: `zp_hid6506` -- -- -------------------------------------------------------- -- -- Structura de tabel pentru tabelul `logExecCmds` -- CREATE TABLE IF NOT EXISTS `logExecCmds` ( `Player` varchar(32) NOT NULL, `Command` varchar(32) NOT NULL, `DateTime` varchar(32) NOT NULL, `ECount` int(11) NOT NULL, PRIMARY KEY (`Player`,`Command`,`DateTime`,`ECount`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Salvarea datelor din tabel `logExecCmds` -- INSERT INTO `logExecCmds` (`Player`, `Command`, `DateTime`, `ECount`) VALUES ('Jimmi', '/goto', '11/06/2015 - 22:31:41', 1), ('Jimmi', '/goto', '12/06/2015 - 15:41:14', 1), ('Jimmi', '/setint', '12/06/2015 - 15:41:37', 2), ('Jimmi', '/setint', '12/06/2015 - 16:31:57', 3), ('Jimmi', '/setint', '12/06/2015 - 16:32:05', 4), ('Jimmi', '/setint', '12/06/2015 - 16:32:33', 5), ('Jimmi', '/setint', '12/06/2015 - 16:37:31', 6), ('Jimmi', '/setint', '12/06/2015 - 17:21:40', 1); /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;Imagini / Video (optional):-
Ati incercat sa rezolvati singur?:Da de 2 ore tot incerc sa fac ceva....Sistemul e facut de la 0
28 answers to this question
Recommended Posts