12.02.2014, 11:57
To the above post: not really..
You have to use these functions:
https://sampwiki.blast.hk/wiki/ShowPlayerNameTagForPlayer
https://sampwiki.blast.hk/wiki/OnPlayerStreamIn
If you want for such variables to save, then SQL would be the best way to store player relationships.
(relationships table: one column AND one row per every player)
Layout:
Example
SELECT * FROM `relationships` WHERE `player` = 'BOB' AND `CHRIS` = 1
If there's any result then bob is a friend of chris, else, they are not friends.
You have to use these functions:
https://sampwiki.blast.hk/wiki/ShowPlayerNameTagForPlayer
https://sampwiki.blast.hk/wiki/OnPlayerStreamIn
If you want for such variables to save, then SQL would be the best way to store player relationships.
(relationships table: one column AND one row per every player)
Layout:
pawn Код:
player BOB CHRIS JOE
BOB null 1 0
CHRIS 1 null 1
JOE 0 1 null
Bob knows Chris, and doesn't know joe
Chris knows both bob and joe
Joe doesn't know bob but knows chris
SELECT * FROM `relationships` WHERE `player` = 'BOB' AND `CHRIS` = 1
If there's any result then bob is a friend of chris, else, they are not friends.