The title says the problem, but I'll elaborate here. You purchase the trigger, but sadly it connects everyone to an absolute no matter what distances the players are to the boat. Me and my friend have been trying to figure out a way to get_players then count them and implement them into the if functions to allow all the players to get on ONLY IF they are in distance to the trigger use. Have had no luck in doing so, if anyone can help, it'd be appreciated.
// all players in the game are now in the array for( i=0 ; i<players.size ; i++ ) { // if a player is downed, skip him if( players[i] maps\_laststand::player_is_in_laststand() ) { continue; }
if( distance( players[i].origin, boat_trig.origin ) < 50 ) { // do what you want here to players that are closer then 50 units to the trigger players[i] thread enter_boat(); } }
// all players in the game are now in the array for( i=0 ; i<players.size ; i++ ) { // if a player is downed, skip him if( players[i] maps\_laststand::player_is_in_laststand() ) { continue; }
if( distance( players[i].origin, boat_trig.origin ) < 50 ) { // do what you want here to players that are closer then 50 units to the trigger players[i] thread enter_boat(); } }
I cannot thank you enough. I have added +1 respect, you really show why your respect is higher than your posts.