SA-MP Forums Archive
Object detection from single player???? - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Object detection from single player???? (/showthread.php?tid=640683)



Object detection from single player???? - CMH - 05.09.2017

Hello.
So I have a question. is it possible to detect a default object in the game, for example CJ's house?



I thought about making a home system, and I want my player to create his house but not wherever he is, but where he is a single-player house.

Thank you in advance


Re: Object detection from single player???? - Kane - 05.09.2017

I don't believe you can but if you're wondering how to remove it:

https://sampwiki.blast.hk/wiki/DisableInteriorEnterExits

Disable all the interior entrances and exits in the game (the yellow arrows at doors).


Re: Object detection from single player???? - CMH - 05.09.2017

Quote:
Originally Posted by Arthur Kane
View Post
I don't believe you can but if you're wondering how to remove it:

https://sampwiki.blast.hk/wiki/DisableInteriorEnterExits

Disable all the interior entrances and exits in the game (the yellow arrows at doors).
It's not about corners, I want to detect the object entirely from single player. if the player is in the single-player house area, he can use an order


Re: Object detection from single player???? - Kane - 05.09.2017

What corners...

Single player houses are only interiors. http://weedarr.wikidot.com/interior

If you really wanna spend time on doing it, what you could do is make an array with all the single player interior coordinates and then check if a player is near one with a function or command.


Re: Object detection from single player???? - CMH - 05.09.2017

Quote:
Originally Posted by Arthur Kane
View Post
What corners...

Single player houses are only interiors. http://weedarr.wikidot.com/interior

If you really wanna spend time on doing it, what you could do is make an array with all the single player interior coordinates and then check if a player is near one with a function or command.
We understand ourselves wrong.
I want to use a command only if I am in the area of a default (single player) object.
I mean, if I'm near a trash can I can use cmd / throw trash


Re: Object detection from single player???? - Dayvison_ - 05.09.2017

Go to location in the map editor
click on the object two times
object details will appear


Re: Object detection from single player???? - CMH - 05.09.2017

Quote:
Originally Posted by Dayvison_
View Post
Go to location in the map editor
click on the object two times
object details will appear
I do not want to do a script for each object. I want to work on all the similar objects in the game
Eg: if I make a command for / enter
the player can enter an interior even if he is at any home model in the game


Re: Object detection from single player???? - Dayvison_ - 05.09.2017

in this site, you can view objects by their categories. With this you can make a pawn array to store similar objects


Re: Object detection from single player???? - Eoussama - 05.09.2017

I guess Colandreas can help you out?