SA-MP Forums

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

Thread Tools Display Modes
Old 13/01/2018, 03:34 PM   #1
Big Clucker
Join Date: Sep 2015
Posts: 111
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 offline   Reply With Quote
Old 13/01/2018, 04:28 PM   #2
Huge Clucker
Join Date: Jan 2012
Location: Germany
Posts: 276
Reputation: 28
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 01:53 AM
ObjectID JaKe Elite Scripting Help 3 29/11/2014 03:43 AM
Suggestion - Attach ObjectID's to Player Bones RedFusion General 3 13/01/2013 02:11 PM
Objectid Glad2BeHere Scripting Help 3 21/10/2012 02:39 AM
What Objectid is this? Blunt P Scripting Help 9 29/06/2012 10:51 AM

All times are GMT. The time now is 12:52 PM.

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