SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Thread Tools Display Modes
Old 13/01/2018, 04:34 PM   #1
Big Clucker
Join Date: Sep 2015
Posts: 91
Reputation: 13
Default If player near objectid, what objectid.

How to check if a player is near an object, and if he is, it gets the object id? How to do that? Right now I've got

GetObjectPos(item1, x, y, z);
GetObjectPos(item2, x, y, z);
GetObjectPos(item3, x, y, z);


if(!IsPlayerNearObject(playerid, item1, 1.0))
that's efficient as it'll check for all objectids at the same time and execute back to the player at the same time.
Swarn is online now   Reply With Quote
Old 13/01/2018, 05:28 PM   #2
Huge Clucker
Join Date: Jan 2012
Location: Germany
Posts: 271
Reputation: 27
Default Re: If player near objectid, what objectid.

Use the streamer for this. Create a dynamic sphere and attach it to the object.
Check out the documentation:
Manyula is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ObjectID SpaMaster Scripting Help 0 04/06/2015 02:53 AM
ObjectID JaKe Elite Scripting Help 3 29/11/2014 04:43 AM
Suggestion - Attach ObjectID's to Player Bones RedFusion General 3 13/01/2013 03:11 PM
Objectid Glad2BeHere Scripting Help 3 21/10/2012 03:39 AM
What Objectid is this? Blunt P Scripting Help 9 29/06/2012 11:51 AM

All times are GMT. The time now is 12:34 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.