SA-MP Forums Archive
Anyone can help me - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Anyone can help me (/showthread.php?tid=211025)



Anyone can help me - Steven Paul - 14.01.2011

I am trying to say that how to make a thing which will can only be done in near of the object without PlayerToPoint or ProxDetector or IsPlayerInRangeOfPoint. For example, this

if(GetPlayerVehicle == 2

for

if(GetPlayerObject == 2

I am making an ATM system so I need this thing so that I can make ATM in game


Re: Anyone can help me - *IsBack - 14.01.2011

You can simply do your function that would check if player is near atm:
pawn Код:
stock IsPlayerNearATM(playerid)
{
if(IsPlayerInRangeOfPoint(playerid,2.0,[ATM1_X],[ATM1_Y],[ATM1_Z])) return 1;
if(IsPlayerInRangeOfPoint(playerid,2.0,[ATM2_X],[ATM2_Y],[ATM2_Z])) return 1;
//And so on, changing [ATM1/2_X/Y/Z] to your ATMs position
return 0;
}
And then use it like this:
pawn Код:
if(IsPlayerNearATM(playerid))
{
//My code!
}



Re: Anyone can help me - Steven Paul - 14.01.2011

nope not that. I want to make ATM in game. So I need that GetPlayerObject system


Re: Anyone can help me - Mean - 14.01.2011

Why the hell do you want GetPlayerObject?
Use CreateObject and after that IsPlayerInRangeOfPoint


Re: Anyone can help me - Steven Paul - 14.01.2011

if that the case then if I create atm in game then it will show up that you are not near any atm


Re: Anyone can help me - *IsBack - 14.01.2011

Quote:
Originally Posted by Steven Paul
Посмотреть сообщение
if that the case then if I create atm in game then it will show up that you are not near any atm
Why would you need to create ATMs in-game? Just place them in script with CreateObject..
If you really wanna have in-game creation system, you'd need a big script for that :P


Re: Anyone can help me - Steven Paul - 14.01.2011

really


Re: Anyone can help me - Steven Paul - 14.01.2011

please help me someone


Re: Anyone can help me - Steven Paul - 14.01.2011

bump!!!!!!


Re: Anyone can help me - Jochemd - 14.01.2011

For that, use OED -> Ingame Object Editor by breadfish