Jump to content
  • 0

Inregistrarea activitatii stafului


Jimmi

Question

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

Link to comment
Share on other sites

Recommended Posts

  • 0

Stiu si eu asta.Asta e problema nu stiu cum sa fac ca sa preia comanda de la cine sa /showstaffactivity.Adica daca dau /showstaffactivity 1 sa imi arate activitatea lui id 1 nu si alte comenzi folosite de alti membri

Link to comment
Share on other sites

  • 0

enum pInfo
{
    pRoadblock,pRadar,pTiredFromGym,pPunish,pTiredFromGrabkick,pTiredFromKarate,pKey[128],pLevel,pAdmin,pDonateRank,
    gPupgrade,pConnectTime,pReg,pSex,pAge,pOrigin[30],pGymEquiped,pKarateEquiped,pBoxFightStyle,pCK,pMuted,pExp,pCash,
    pAccount,pCrimes,pKills,pDeaths,pArrested,pWantedDeaths,pPhoneBook,pLottoNr,pFishes,pBiggestFish,pJob,pPayCheck,
    pHeadValue,pJailed,pJailTime,pMats,pDrugs,pTow,pLeader,pMember,pFMember,pRank,pChar,pContractTime,pDetSkill,pSexSkill,
    pBoxSkill,pLawSkill,pBoxingSkill,pGrabkickSkill,pKarateSkill,pMechSkill,pJackSkill,pCarSkill,
    pNewsSkill,pDrugsSkill,pCookSkill,pFishSkill,pDMVCar,Float:pHealth,Float:pSHealth,pInt,pLocal,pTeam,pModel,pPnumber,
    pPhousekey,pPbiskey,Float:pPos_x,Float:pPos_y,Float:pPos_z,pCarLic,pFlyLic,pBoatLic,pFishLic,pGunLic,pGun1,pGun2,pGun3,
    pGun4,pAmmo1,pAmmo2,pAmmo3,pAmmo4,pCarTime,pPayDay,pPayDayHad,pCDPlayer,pWins,pLoses,pAlcoholPerk,pDrugPerk,pMiserPerk,
    pPainPerk,pTraderPerk,pTut,pMissionNr,pWarns,pAdjustable,pFuel,pMarried,pMarriedTo[128],LastLogin[128],pRobbingBank,
    pJob1,pAchievement1,pAchievement2,pAchievement3,pAchievement4,pAchievement5,pAchievement6,pAchievement7,pAchievement8,
    pAchievement9,pTrial,pNewbTimer,pGPPoints,pRPBoost,pIP[256],pCar1,pCar2,pCar3,pAchievement10,pAchievement11,pAchievement12,
    pAchievement13,pAchievement14,pAchievement15,pAchievement16,pAchievement17,pAchievement18,pAchievement19,pAchievement20,
    pAchievement21,pAchievement22,pAchievement23,pAchievement24,pAchievement25,pAchievement26,pAchievement27,pAchievement28,
    pAchievement29,pAchievement30,pAchievement31,pAchievement32,pAchievement33,pAchievement34,pAchievement35,pAchievement36,
    pAchievement37,pFwarn,pAchievement38,pAchievement39,pAchievement40,pStyle,pSQLID,pCombina,pSText[100],pGPS,pEmail[50],pCadou,pLiderW,pRMuted
};

Link to comment
Share on other sites

  • 0

La tine in comanda trebuie ca inceputul sa arate asa.

new Query[96];

format(Query, sizeof(Query), "SELECT * FROM `logExecCmds` WHERE `Player` = '%i' LIMIT 10", PlayerInfo[playerid][pName]); // Aici iti recomand mysql_format daca ai R30+.
mysql_query(Query);

// De aici daca ai R30+ inlocuiesti "mysql_query(Query);" cu "new Cache:cache = mysql_query(Query);" setezi cache-ul activ pe "cache" si preiei ce ai nevoie.

 

 

Link to comment
Share on other sites

  • 0

Imi da o eroare:

C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(27897) : error 076: syntax error in the expression, or invalid function call
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


1 Error.


Folosesc mysql r6.

Asa am facut comanda

//========================================[CMD /SHOWSTAFFACTIVITY]============================================//
CMD:showstaffactivity(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        new jucator, Query[96];
	    format(Query, sizeof(Query), "SELECT * FROM `logExecCmds` WHERE `Player` = '%i' LIMIT 10", PlayerInfo[playerid][pName]);
	    mysql_query(Query);
        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;
}

 

Link to comment
Share on other sites

  • 0

Trebuie s-o adaptezi pentru comanda ta. De exemplu acolo unde este format-ul si mysql_query trebuie puse dupa if(sscanf(...)) si asta

PlayerInfo[playerid][pName]

trebuie inlocuita cu

PlayerInfo[jucator][pName]

si dupa toate asta sa selectezi rezultatul provenit din mysql_query si sa il afisezi in dialog.

 

Si data viitoare spune si unde este lina cu problema...

Link to comment
Share on other sites

  • 0

Exact aceasi eroare:

C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(27899) : error 076: syntax error in the expression, or invalid function call

Linia 27899

format(Query, sizeof(Query), "SELECT * FROM `logExecCmds` WHERE `Player` = '%i' LIMIT 10", PlayerInfo[jucator][pName]);

Comanda aranjata cred

//========================================[CMD /SHOWSTAFFACTIVITY]============================================//
CMD:showstaffactivity(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        new jucator;
        new Query[96];
        if(sscanf(params, "u", jucator)) return SendClientMessage(playerid, COLOR_GRAD2, "{00FF00}Folosire:{FFFFFF} /showstaffactivity [PlayerID/PartOfName]");
		format(Query, sizeof(Query), "SELECT * FROM `logExecCmds` WHERE `Player` = '%i' LIMIT 10", PlayerInfo[jucator][pName]);
	    mysql_query(Query);
		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;
}

 

Link to comment
Share on other sites

  • 0

Acum am vazut ceva, inlocuieset

PlayerInfo[jucator][pName]

cu

PlayerInfo[jucator][pSQLID]

Dupa asta trebuie sa iti iei totul din ce ai executat in query, trebuie sa te folosesti de

http://wiki.sa-mp.com/wiki/MySQL#mysql_retrieve_row

http://wiki.sa-mp.com/wiki/MySQL#mysql_fetch_field_row

Acolo ai tot ce trebuie sa faci, doar ca in acel cat timp (while) trebuie sa formatezi textul pentru a il arata in dialog.

Link to comment
Share on other sites

  • 0

Problema e ca acuma nu mai arata comenzile in baza de date

dau /setint si nu mai apar in baza de date:

if(strcmp(cmd, "/setint", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "{00FF00}Folosire:{FFFFFF} /setint [playerid/numejucator] [interiorid]");
				return 1;
			}
			new playa;
			playa = ReturnUser(tmp);
			new intid;
			tmp = strtok(cmdtext, idx);
			intid = strvalEx(tmp);
			if (PlayerInfo[playerid][pAdmin] >= 1|| PlayerInfo[playerid][pTrial] >= 1)
			{
			    if(IsPlayerConnected(playa))
			    {
			        if(playa != INVALID_PLAYER_ID)
			        {
			    		GetPlayerName(playa, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						SetPlayerInterior(playa, intid);
						PlayerInfo[playa][pInt] = intid;
						format(string, sizeof(string), "   I-ai setat interiorul lui %s pe %d.", giveplayer, intid);
						SendClientMessage(playerid, COLOR_GRAD1, string);
						format(string, sizeof(string), "   %s ti-a setat interiorul pe %d.", sendername, intid);
						SendClientMessage(playa, COLOR_GRAD1, string);
						ExecCMD[playerid]++;
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "** Nu ai rangul administrativ necesar!");
			}
		}
		SaveExecCMDS(playerid, "/setint", ExecCMD[playerid]);
		return 1;
	}

SaveExecCMDS(playerid, "/setint", ExecCMD[playerid]);

si

ExecCMD[playerid]++; 

le-am adaugat sa sa salvee in save de date si nu inteleg de ce nu mai merge acuma....

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;
}

Link to comment
Share on other sites

  • 0

Ma miram de ce a cazut sv:

14:50:49] >> mysql_query( Connection handle: 1 )

[14:50:49] CMySQLHandler::Query(SELECT * FROM `logExecCmds` WHERE `Player` = '0' LIMIT 10) - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)

[14:50:49] OnQueryError() - Called.

[14:50:50] >> mysql_query( Connection handle: 1 )

[14:50:50] CMySQLHandler::Query(INSERT INTO `logExecCmds`(`Player`, `Command`, `DateTime`, `ECount`) VALUES ('starz','/goto','16/06/2015 - 14:50:50','1')) - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)

[14:50:50] OnQueryError() - Called.

[14:50:53] >> mysql_query( Connection handle: 1 )

[14:50:53] CMySQLHandler::Query(SELECT * FROM `logExecCmds` WHERE `Player` = '0' LIMIT 10) - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)

[14:50:53] OnQueryError() - Called.

[14:51:07] >> mysql_query( Connection handle: 1 )

[14:51:07] CMySQLHandler::Query(INSERT INTO `logExecCmds`(`Player`, `Command`, `DateTime`, `ECount`) VALUES ('Jimmi','/goto','16/06/2015 - 14:51:07','1')) - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)

[14:51:07] OnQueryError() - Called.

[14:51:14] >> mysql_query( Connection handle: 1 )

[14:51:14] CMySQLHandler::Query(SELECT * FROM `logExecCmds` WHERE `Player` = '0' LIMIT 10) - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)

[14:51:14] OnQueryError() - Called.

[14:51:45] >> mysql_query( Connection handle: 1 )

[14:51:45] CMySQLHandler::Query(UPDATE `players` SET `Money`='22906207' WHERE `username`='Jimmi') - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)

[14:51:45] >> mysql_query( Connection handle: 1 )

[14:51:45] CMySQLHandler::Query(UPDATE `players` SET `Money`='24449623' WHERE `username`='starz') - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)

[14:51:45] OnQueryError() - Called.

[14:51:45] OnQueryError() - Called.

[14:51:49] >> mysql_query( Connection handle: 1 )

[14:51:49] CMySQLHandler::Query(UPDATE `players` SET `Deaths`='361' WHERE `username`='Jimmi') - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)

[14:51:49] OnQueryError() - Called.

[14:51:50] >> mysql_query( Connection handle: 1 )

[14:51:50] CMySQLHandler::Query(INSERT INTO `logExecCmds`(`Player`, `Command`, `DateTime`, `ECount`) VALUES ('Jimmi','/goto','16/06/2015 - 14:51:50','2')) - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)

[14:51:50] OnQueryError() - Called.

[14:51:52] >> mysql_query( Connection handle: 1 )

[14:51:52] CMySQLHandler::Query(UPDATE `players` SET `Paycheck`='52570',`JailTime`='0',`iInt`='0',`iLocal`='255',`Team`='11',`Muted`='0', `CarTime`='0', `Level`='10', `Respect`='34' WHERE `username`='Jimmi') - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)

[14:51:52] >> mysql_query( Connection handle: 1 )

[14:51:52] CMySQLHandler::Query(UPDATE `players` SET `Respect`='34' WHERE `username`='Jimmi') - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)

[14:51:52] >> mysql_query( Connection handle: 1 )

[14:51:52] CMySQLHandler::Query(UPDATE `players` SET `ConnectedTime`='77' WHERE `username`='Jimmi') - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)

[14:51:52] >> mysql_query( Connection handle: 1 )

[14:51:52] CMySQLHandler::Query(UPDATE `players` SET `Points`='42' WHERE `username`='Jimmi') - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)

[14:51:52] OnQueryError() - Called.

[14:51:52] OnQueryError() - Called.

[14:51:52] OnQueryError() - Called.

[14:51:52] OnQueryError() - Called.

[14:52:22] >> mysql_query( Connection handle: 1 )

[14:52:22] CMySQLHandler::Query(INSERT INTO `logExecCmds`(`Player`, `Command`, `DateTime`, `ECount`) VALUES ('Jimmi','/opr','16/06/2015 - 14:52:22','3')) - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)

[14:52:22] OnQueryError() - Called.

[14:52:30] >> mysql_query( Connection handle: 1 )

[14:52:30] CMySQLHandler::Query(SELECT * FROM `logExecCmds` WHERE `Player` = '0' LIMIT 10) - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)

[14:52:30] OnQueryError() - Called.

[14:52:32] >> mysql_query( Connection handle: 1 )

[14:52:32] CMySQLHandler::Query(SELECT * FROM `logExecCmds` WHERE `Player` = '0' LIMIT 10) - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)

[14:52:32] OnQueryError() - Called.

[14:53:23] >> mysql_query( Connection handle: 1 )

[14:53:23] CMySQLHandler::Query(INSERT INTO `logExecCmds`(`Player`, `Command`, `DateTime`, `ECount`) VALUES ('Jimmi','/goto','16/06/2015 - 14:53:23','4')) - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)

[14:53:23] OnQueryError() - Called.

[14:53:47] >> mysql_query( Connection handle: 1 )

[14:53:47] CMySQLHandler::Query(INSERT INTO `logExecCmds`(`Player`, `Command`, `DateTime`, `ECount`) VALUES ('Jimmi','/goto','16/06/2015 - 14:53:47','5')) - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)

[14:53:47] OnQueryError() - Called.

[14:55:07] >> mysql_ping( Connection handle: 1 )

[14:55:20]  

[14:55:20] ---------------------------

[14:55:20] MySQL Debugging activated (06/16/15)

[14:55:20] ---------------------------

[14:55:20]  

 

Link to comment
Share on other sites

  • 0
CMD:showstaffactivity(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        new jucator;
        new Query[96];
        if(sscanf(params, "u", jucator)) return SendClientMessage(playerid, COLOR_GRAD2, "{00FF00}Folosire:{FFFFFF} /showstaffactivity [PlayerID/PartOfName]");
		format(Query, sizeof(Query), "SELECT * FROM `logExecCmds` WHERE `Player` = '%i' LIMIT 10", PlayerInfo[jucator][pSQLID]);
	    mysql_query(Query);
		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;
}

 

Link to comment
Share on other sites

  • 0

Dupa mysql_query pune

new Result[2][65], Text[256]; // 256 e cam mare, dar nu stiu cat de lungi sunt comenzile tale si am zis sa fiu sigur.

mysql_ store_result(); // Stochezi rezultatele din mysql_query.
 
while(mysql_retrieve_row()) // Preiei toate randurile din interogare.
{
    mysql_fetch_field_row(Result[0], "Command"); // Din randul selectat preiei coloana "Command".
    mysql_fetch_field_row(Result[1], "ECount"); // -------------IDEM------------------ "ECount"
    format(Text, sizeof(Text), "%s\n%s - %i ori", Text, Result[0], Result[1]); // Formatezi textul pentru a fi afisat in dialog.
}
 
mysql_free_result(); // Eliberezi rezultatul interogarii.

Acum in loc de

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","");

pui

ShowPlayerDialog(playerid, 9, DIALOG_STYLE_MSGBOX, str, Text,"Close","");

 

Edited by WopsS
Am adaugat explicatii.
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

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.