wait 5000
0AF8: samp add_message_to_chat "[UGBASE.EU] {FFFFFF}Player Finder made by {00DE21}TH3RM4L-" color 0x0095FF
0B34: samp register_client_command "cfind" to_label @start
0B34: samp register_client_command "myfind" to_label @my_find
0B34: samp register_client_command "stopfind" to_label @stop
31@ = false
30@ = false
:cfind
wait 0
if
31@ == true
jf @cfind
if
SAMP.IsPlayerConnected(2@)
jf @disconnected
3@ = SAMP.GetActorHandleByPlayerID(2@)
if
856D: actor 3@ defined
jf @find
0B2F: samp get_streamed_out_player_pos 2@ to 9@ 10@ 11@
12@ = Marker.CreateIconAndSphere(41, 9@, 10@, 11@)
wait 750
Marker.Disable(12@)
wait 100
:find
wait 0
if
056D: actor 3@ defined
jf @cfind
Actor.StorePos(3@, 5@, 6@, 7@)
8@ = Marker.CreateIconAndSphere(41, 5@, 6@, 7@)
wait 750
Marker.Disable(8@)
wait 100
goto @cfind
:start
if
30@ == false
jf @finding_more_players
SAMP.IsCommandTyped(0@)
if
0AD4: 1@ = scan_string 0@ format "%d" 2@
jf @usage
if
SAMP.IsPlayerConnected(2@)
jf @invalid_id
30@ = true
31@ = true
0B36: samp 4@ = get_player_nickname 2@
0AF8: samp add_message_to_chat "Marker set on the player %s, ID %d. Use [/stopfind] to stop finding." color 0x6098D1 4@ 2@
SAMP.CmdRet
goto @cfind
:stop
if
31@ == true
jf @not_finding
30@ = false
31@ = false
Marker.Disable(8@)
0AF8: samp add_message_to_chat "The finding has been stopped succefully." color 0x6098D1
SAMP.CmdRet
goto @cfind
:my_find
if
31@ == true
jf @not_finding
0AF8: samp add_message_to_chat "You are finding %s, ID %d." color 0x6098D1 4@ 2@
SAMP.CmdRet
goto @cfind
:disconnected
0AF8: samp add_message_to_chat "The player which you were finding has disconnected." color 0xBF0000
30@ = false
31@ = false
goto @cfind
:finding_more_players
0AF8: samp add_message_to_chat "You can't find more players at the same time. Use [/stopfind] to stop finding." color 0xFBE29C
SAMP.CmdRet
goto @cfind
:usage
0AF8: samp add_message_to_chat "USAGE: /cfind <playerID>" color 0xBFBFBF
SAMP.CmdRet
goto @cfind
:invalid_id
0AF8: samp add_message_to_chat "Invalid ID." color 0xBF0000
SAMP.CmdRet
goto @cfind
:not_finding
0AF8: samp add_message_to_chat "You are not finding anyone." color 0xFBE29C
SAMP.CmdRet
goto @cfind