Help about 3 things.
#1

Can someone help me with these 3 things?

1) I made an AFK system and i want to set player virtual world after player is AFK. But how do i restore their virtual world? To put the player at the same spot where they typed /afk.

2) I want to add the AFK tag to the name of a player on the players list(Tab button) so the other players will know that the player is AFK. How to add/remove them?

3) I also made an admin duty command, and the problem is i can't restore player's color to previous one. Like player has the class's color and he typed /aduty, then his color will be changed to pink and after doing /aoffduty, he will get the previous color he had before doing /aduty.

Thanks.
Reply
#2

https://sampwiki.blast.hk/wiki/GetPlayerPos to get the position of the player, save it to an array for example. To get to the same spot.

Get and set: https://sampwiki.blast.hk/wiki/GetPlayerVirtualWorld to first save it with get into an array or any variable really that is MAX_PLAYERS and then setplayervirtualworld to set it after him being afk.

Play around with https://sampwiki.blast.hk/wiki/Create3DTextLabel and play around with attaching the text label to the player as well.

I don't know if you're using text labels for name tag colors or not but if it's the same name tag color as in TAB list, then this is something for you: https://sampwiki.blast.hk/wiki/GetPlayerColor


Hope it helped somewhat. I answered based on the information you gave me.
Reply
#3

I am not asking about the 3DTextLabel, i already created a working label for admin and afk players. I just want the [AFK] tag appears on your name in the players list that appears when you press TAB button. And also GetPlayerColor function didn't work, i tried it already.
Reply
#4

about the namechange on TAB, u can make a system where
first you get the players actual name
then if(.....afk=1)
set players name to "(actual name) [AFK]"
and when they are back u can use the older value to restore their name.
but, this is not a good idea, because i can impersonate someone when they are afk.
a small example is:
My name is Ray_Dcosta
im afk and now my name is Ray_Dcosta[AFK]
now that my name isnt Ray_Dcosta anymore,
someone else can register with that name, and then its gone forever.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)