SA-MP Forums Archive
Timed ban - sql - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Timed ban - sql (/showthread.php?tid=443756)



Timed ban - sql - BruLaX - 13.06.2013

Hello i have a problem when i try to make a time ban commands : week hours minutes days etc i fail completly i try everything nothing works can somewhone make it for me with this command its a simple ban commands sql


make from this command a timeban commande pls help me

Код:
dcmd_adban(playerid,params[])
{
	new string[280];
	new ID;
	new cmdreason[100];
	new pname[20];
	new IP[16];
	if(sscanf(params,"us[100]",ID,cmdreason))
	{
	    SendClientMessage(playerid,COLOR_ERROR,"USAGE: /adban (player name or id) (Reason)");
	    return 1;
	}
	GetPlayerName(playerid, pname, 24);
	GetPlayerIp(playerid, IP, 16);
	NameBanned[ID] =1;
	Banning[ID] =1;


	SetTimer("BanPlayer",700,0);
	format(string,sizeof(string)," Un Administrator hase banned %s(%d) Reason: %s.",PlayerName(ID),ID,cmdreason);
	SendClientMessageToAllPlayers(string);
	
	new query[400];
	format(query, sizeof(query), "INSERT INTO `logs` (`Command`,`Admin`,`Player`,`Reason`) VALUES ('ADBAN','%s','%s','%s')",PlayerName(playerid),PlayerName(ID),cmdreason);
	mysql_query(query);
	return 1;
}



Re: Timed ban - sql - BruLaX - 14.06.2013

up pls


Re: Timed ban - sql - BruLaX - 14.06.2013

Need help pls !!!