Rough
Active member
- Joined
- Mar 7, 2015
- Messages
- 42
- Reaction score
- 4
if and
0AB0: 0@
8B21: samp is_chat_opened
8BAB: dialog -1 is_exists
then
FOR 12@ = 0 to 999
IF
SAMP.IsPlayerConnected(12@)
THEN
26@ = SAMP.GetActorHandleByPlayerID(12@)
IF AND
056D: actor 26@ defined
00DF: actor 26@ driving
0101: actor 26@ in_sphere 10@ 11@ 12@ radius 5.0 5.0 3.0 sphere 0 stopped
THEN
00A0: store_actor $PLAYER_ACTOR position_to 13@ 14@ 15@
00A0: store_actor 26@ position_to 16@ 17@ 18@
050A: 19@ = distance_between_XYZ 13@ 14@ 15@ and_XYZ 16@ 17@ 18@
SAY "/find %d" 12@
chatmsg "finding %d" -1 12@
WAIT 250
END
else
chatmsg " error" -1
END
end
end
0AB2: ret 0
I made it, when I press a button e.g (left click) it would scan all streamed player from 0 to 999 and find all fo them, but I need it to find only in front of my car for a faster find, I tried to work with sphere but I have no Idea how to use it, any help please?
Thank you!
0AB0: 0@
8B21: samp is_chat_opened
8BAB: dialog -1 is_exists
then
FOR 12@ = 0 to 999
IF
SAMP.IsPlayerConnected(12@)
THEN
26@ = SAMP.GetActorHandleByPlayerID(12@)
IF AND
056D: actor 26@ defined
00DF: actor 26@ driving
0101: actor 26@ in_sphere 10@ 11@ 12@ radius 5.0 5.0 3.0 sphere 0 stopped
THEN
00A0: store_actor $PLAYER_ACTOR position_to 13@ 14@ 15@
00A0: store_actor 26@ position_to 16@ 17@ 18@
050A: 19@ = distance_between_XYZ 13@ 14@ 15@ and_XYZ 16@ 17@ 18@
SAY "/find %d" 12@
chatmsg "finding %d" -1 12@
WAIT 250
END
else
chatmsg " error" -1
END
end
end
0AB2: ret 0
I made it, when I press a button e.g (left click) it would scan all streamed player from 0 to 999 and find all fo them, but I need it to find only in front of my car for a faster find, I tried to work with sphere but I have no Idea how to use it, any help please?
Thank you!