Filter script friend - 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: Filter script friend (
/showthread.php?tid=577838)
Filter script friend -
zeth98 - 14.06.2015
Hei guys I taked this filterscript from the forum
https://sampforum.blast.hk/showthread.php?tid=446329
And don't have the function to delete maybe help me?
format(Querys,sizeof(Querys),"DELETE FROM friendlist WHERE fr_name = %s", giveplayerid);
mysql_query(Querys);
giveplayerid is the name who I typed
Re: Filter script friend -
zeth98 - 14.06.2015
what mysql function i need to use?
Re: Filter script friend -
Sinox - 14.06.2015
Try this:
Код:
format(Querys,sizeof(Querys),"DELETE FROM friendlist WHERE fr_name = '%s'", giveplayerid);
Re: Filter script friend -
zeth98 - 15.06.2015
Quote:
Originally Posted by Sinox
Try this:
Код:
format(Querys,sizeof(Querys),"DELETE FROM friendlist WHERE fr_name = '%s'", giveplayerid);
|
If i am friend with 3 player and one delete me i deleted from all player friend list.
Re: Filter script friend -
mamorunl - 15.06.2015
fr_name should probably be a string? So GetPlayerName()? Also: add in an additional parameter: "AND <my_id>=%d". Or however your database is set up.
Re: Filter script friend -
zeth98 - 15.06.2015
Quote:
format(string,sizeof(string),"DELETE FROM friendlist WHERE fr_name = '%s' AND username = '%s' ",(result),PlayerName(playerid));
mysql_query(string);
|
Thanks it work