Filter script friend
#1

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
Reply
#2

what mysql function i need to use?
Reply
#3

Try this:

Код:
format(Querys,sizeof(Querys),"DELETE FROM friendlist WHERE fr_name = '%s'", giveplayerid);
Reply
#4

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.
Reply
#5

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.
Reply
#6

Quote:

format(string,sizeof(string),"DELETE FROM friendlist WHERE fr_name = '%s' AND username = '%s' ",(result),PlayerName(playerid));
mysql_query(string);

Thanks it work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)