Hello, I have this code in lua/server (3 is the taxi team)
concommand.Add( "callTaxi", function( ply, cmd, args ) -- Creates a console command if ply:Team() == 3 then -- Tests if the player is in the team ply:PrintMessage( HUD_PRINTTALK, "You can't call a taxi while being a taxi." ) elseif ply:Team() != 3 then if team.NumPlayers( 3 ) != 0 then -- If there is players in the team taxiTeam = team.GetPlayers( 3 ) -- Gets all the players in the team taxiTeamPlayer = table.Random( taxiTeam ) -- Choose a random player from the team taxiTeamPlayer:PrintMessage( HUD_PRINTTALK, "A player need you." ) -- Draw a square where the player who executed the command is -- elseif team.NumPlayers( 3 ) == 0 then ply:PrintMessage( HUD_PRINTTALK, "No taxi in the city." ) end end end )
And I want to draw a square where the player executed the command “callTaxi” and removes it when the “taxiTeamPlayer” as came close to the destination. (Kind of GPS)
I know I can use
render.DrawQuadEasy but I don’t know how to do what I want.