![]() |
Question about with (getplayer)
Is it possible to use with (getplayer) to get a player who has a certain distance from the current player?
Like this... NPC Code: |
I presume you'd have to use testplayer to check the index of any nearby players, then use something similar to with(getplayer(#a(index))) to select the player for editing. But it should be possible, yes.
|
use with(players[index])
it can get any player in the level the script is run in |
Quote:
|
Quote:
|
Well for some reason I doubt this would work :-\
NPC Code: |
Quote:
|
XD, I did get it, but it turns out that it doesn't do what I thought it would.
What about a way to execute a command when two players touch eachother. |
googi, use testplayer (i think thats what it is called) to get the index.
format is testplayer(x,y) it returns the index # of the player at those coordinates |
Quote:
XD, for some reason I neglected to learn about indexs. Any good tutorials about indexs? |
Quote:
|
Quote:
Okay, now I know what I'm doing (I hope XD) But how do I get the index without using testplayer (Since you say it is a bad idea) |
if you want to go through the players in a level, run a for loop
for(i=0;i<playerscount;i++){ with(players[i]){ //stuff } } |
NPC Code: Once again I doubt that will work. |
Quote:
|
All times are GMT +2. The time now is 10:00 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.