|
|
#1 | ||||
|
Big Clucker
![]() ![]() Join Date: Jul 2010
Posts: 108
Reputation: 0
|
==== Information. ===== Quote:
==== Variables. ===== Ok, create that variables on top of ur script.Quote:
==== Create the object. ===== Put this object somewhere at OnGameModeInitQuote:
==== PlayerToPoint function. ===== Put it anywhere.stock PlayerToPoint(Float:radi, playerid, Float , Float:y, Float:z){ if(IsPlayerConnected(playerid)) { new Float ldposx, Float ldposy, Float ldposz;new Float:tempposx, Float:tempposy, Float:tempposz; GetPlayerPos(playerid, oldposx, oldposy, oldposz); tempposx = (oldposx -x); tempposy = (oldposy -y); tempposz = (oldposz -z); if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) { return 1; } } return 0; } ==== Ok, - moving object, etc. ===== Ok, last - put this somewhere OnPlayerUpdateQuote:
Last edited by AndriusZ*; 11/09/2010 at 05:55 PM. |
||||
|
|
|
|
|
#2 |
|
Huge Clucker
Join Date: Sep 2010
Posts: 200
Reputation: 0
|
nice!
but why not isplayerinrangeofpoint? |
|
|
|
|
|
#3 |
|
Big Clucker
![]() ![]() Join Date: Jul 2010
Posts: 108
Reputation: 0
|
well, if i need to check is player near some . . . im using playertopoint..
+ some lines of script created by another ppl. :P
|
|
|
|
|
|
#4 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jul 2010
Location: The Netherlands Occupation: Officer in training
Posts: 1,395
Reputation: 478
|
coowl, i'll use it for my admin house
![]() ** This forum requires that you wait 120 seconds between posts. Please try again in 36 seconds. >: ( |
|
|
|
|
|
#5 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Apr 2010
Location: Lithuania
Posts: 1,352
Reputation: 130
|
tag the code with [ pawn] [ /pawn]
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| automatic gates | tomo523869 | Help Archive | 5 | 21/03/2010 11:40 PM |
| Automatic Gates | Ritchie999 | Server Support | 0 | 31/10/2009 01:34 AM |
| need help with automatic gates! | BMGP | Help Archive | 2 | 24/08/2009 11:30 AM |
| automatic gates help | Sfinx_17 | Help Archive | 2 | 22/08/2009 09:09 PM |
| about automatic gates | Sfinx_17 | Help Archive | 5 | 20/08/2009 03:05 PM |