Help! Save mute system and admin jail system. - 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: Help! Save mute system and admin jail system. (
/showthread.php?tid=512630)
Help! Save mute system and admin jail system. -
Firstaction - 11.05.2014
Hi,Jail and mute system i want to saving systems.My gamemode is mysql.I Jail and mute jail looking.I'm sorry bad English.
Re: Help! Save mute system and admin jail system. -
Beckett - 11.05.2014
This is a
help section not Request Scripts.
Re: Help! Save mute system and admin jail system. -
Firstaction - 11.05.2014
Quote:
Originally Posted by DaniceMcHarley
This is a help section not Request Scripts.
|
Yardım etsen цlecen mi amk?
Re: Help! Save mute system and admin jail system. -
ball - 11.05.2014
You have to checking in OnPlayerDisconnect callback if player is muted or is in jail. Create for this new table (for example jailedplayers) and in OnPlayerConnect and execute mysql query
Code:
//OnPlayerDisconnect
if(jail || muted) //i dont know name of yours gamemod variables
{
mysql_query(INSERT INTO ...); //save player name, uID (if your gamemod have uIDs for registered players, time)
}
//OnPlayerConnect
format(string, 128, "SELECT name, uid, time from jailedplayers where uid = %d or name = '%s'", ...);
mysql_query(string);
if(mysql_num_rows()) //system found something
{
SendClientMessage(playerid, -1, "You has left the server while in jail or you was muted!");
//the rest of code
}
Of cours this is only a clue for this.