SA-MP Forums Archive
[FilterScript] Friends System [MySQL, sscanf, ZCMD] - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Friends System [MySQL, sscanf, ZCMD] (/showthread.php?tid=446329)



Friends System v2.0 [MySQL, sscanf, ZCMD] - Smokkr - 25.06.2013

Friends Filterscript

Information:
This is my first MySQL filterscript which is good for RolePlay servers. You can add your friends In-Game and if you
have access to database you can also add them in table.This filterscript is simple for now.I will make it dynamic :P as soon as I can.
/addfriend [PlayerID/Name] - adds a player to your friends list.
/friends - shows your friend list.
Screenshots:

If you don't have any friends:

Update:
-Added dialogs
-Shows if player is online or offline
Credits:
Smokkr - Creating that filterscript
doreto - Helping me
park4bmx - Creating IsPlayerOnline stock
BlueG - MySQL
ZeeX - ZCMD
****** - sscanf
Download:
Pastebin - Version 2.0
MediaFire - Version 2.0
MediaFire - Version 1.0
NOTE:To run the filterscript properly you must have sscanf and mysql plugins and add them into 'plugins' line on your server.cfg!


Re: Friends System [MySQL, sscanf, ZCMD] - [UG]Daniel - 25.06.2013

Nice


Re: Friends System [MySQL, sscanf, ZCMD] - xser - 25.06.2013

Nice and simple


Re: Friends System [MySQL, sscanf, ZCMD] - ScRipTeRi - 25.06.2013

Very nice


Re: Friends System [MySQL, sscanf, ZCMD] - Smokkr - 25.06.2013

Thanks anyway, but I don't need opinion of somebody who don't even try to click the Download button.


Re: Friends System [MySQL, sscanf, ZCMD] - RaZzZzoR - 25.06.2013

Quote:
Originally Posted by Smokkr
View Post
Thanks anyway, but I don't need opinion of somebody who don't even try to click the Download button.
So you need the opinion of somebody who clicked the download button ?

R6 ? It's sample.
Try R8. It's much faster.
Anything else, you can use dialogs to make it look great.
And some identitation won't be bad.

Suggestion for v2( if will be ): /removefriend.


Re: Friends System [MySQL, sscanf, ZCMD] - Smokkr - 25.06.2013

This is good suggestion. I will made it with •. For example:
Player (When the player is online)
Player (When the player is offline)


Re: Friends System [MySQL, sscanf, ZCMD] - x96664 - 26.06.2013

Hmm I like it! One suggestion: in the next version you can add join/leave messages ex. Blabla has just came online/ has just left the server only for the people in the friend list (just like in World of warcraft).


Re: Friends System [MySQL, sscanf, ZCMD] - K3 - 28.06.2013

Nice.


Re: Friends System [MySQL, sscanf, ZCMD] - Smokkr - 02.07.2013

Updated to version 2.0!


Re: Friends System [MySQL, sscanf, ZCMD] - Dangjai - 14.06.2015

Good job. Good idea.


Re: Friends System [MySQL, sscanf, ZCMD] - GShock - 14.06.2015

"You don't have friends"
*foreveralone*

Good script!


Re: Friends System [MySQL, sscanf, ZCMD] - GuyYahood1 - 14.06.2015

Nice


Re: Friends System [MySQL, sscanf, ZCMD] - Synapse46 - 08.08.2015

Nice. Thanks


Re: Friends System [MySQL, sscanf, ZCMD] - MiyuUchiha - 19.10.2015

i Get This Error Code

C:\SMSERVER\REALSERVER\filterscripts\friend.pwn(18 ) : warning 206: redundant test: constant expression is non-zero
C:\SMSERVER\REALSERVER\filterscripts\friend.pwn(18 ) : warning 215: expression has no effect
C:\SMSERVER\REALSERVER\filterscripts\friend.pwn(38 ) : warning 205: redundant code: constant expression is zero
C:\SMSERVER\REALSERVER\filterscripts\friend.pwn(38 ) : warning 215: expression has no effect
C:\SMSERVER\REALSERVER\filterscripts\friend.pwn(23 1) : error 035: argument type mismatch (argument 1)
C:\SMSERVER\REALSERVER\filterscripts\friend.pwn(23 2) : error 017: undefined symbol "mysql_store_result"
C:\SMSERVER\REALSERVER\filterscripts\friend.pwn(23 4) : error 017: undefined symbol "mysql_num_rows"
C:\SMSERVER\REALSERVER\filterscripts\friend.pwn(23 7) : error 017: undefined symbol "mysql_fetch_row_format"
C:\SMSERVER\REALSERVER\filterscripts\friend.pwn(24 0) : error 017: undefined symbol "mysql_fetch_field_row"
C:\SMSERVER\REALSERVER\filterscripts\friend.pwn(26 : error 035: argument type mismatch (argument 1)
C:\SMSERVER\REALSERVER\filterscripts\friend.pwn(27 4) : error 017: undefined symbol "mysql_free_result"
C:\SMSERVER\REALSERVER\filterscripts\friend.pwn(30 3) : error 010: invalid function or declaration

8 Errors.


Re: Friends System [MySQL, sscanf, ZCMD] - HydraHumza - 19.10.2015

you need mysql r6 version


Re: Friends System [MySQL, sscanf, ZCMD] - Tomboeg - 22.10.2015

Haha nice. Looks good.


Re: Friends System [MySQL, sscanf, ZCMD] - Ugaustin - 29.10.2015

how can I make cmd /df so it cant delete friend?why didn't you make?


Re: Friends System [MySQL, sscanf, ZCMD] - SecretBoss - 29.10.2015

Quote:
Originally Posted by Ugaustin
View Post
how can I make cmd /df so it cant delete friend?why didn't you make?
Do not use this script it uses ancient mysql also it is outdated


Re: Friends System [MySQL, sscanf, ZCMD] - Lordzy - 29.10.2015

You must either select DISTINCT results or do a check before adding anyone as a friend, whether he/she is already added or not. From what I see on your code currently, you can add a person as friend as many times you want and spam it in your dialog when /friends is executed.