Jump to content

outputChatBox Server-Side only for one player ?


Karuzo

Recommended Posts

So heres me problem :

I've got an outputChatBox Server-Sided and i tried to just output it for the player who enters a vehicle..

Well , i tried it with source, but it didn't worked. everybody has saw the message.

So i've tried it like that :

outputChatBox("TEXT",source,255,69,0) 

I think i could trigger it to the Client . but i think there would be an easier way ?

Link to comment
  
outputChatBox("TEXT",thePlayer,255,69,0) 
  

Try it.

That would only make sense if he defined the player as thePlayer, you should probably stop post-whoring because it's becoming obvious with your copious amount of fails.

@OP post the whole function and we'll see what do brah.

Link to comment
addEventHandler("onVehicleEnter",getRootElement(),function ( player,seat) 
    if seat == 0 then 
        triggerClientEvent("ChatMessage",getRootElement()) 
        local enginestate = getElementData(source,"engine") 
        if not enginestate then 
        setElementData(source,"engine",false) 
        enginestate = false 
        end 
        if enginestate == false then 
        setVehicleEngineState(source,false) 
        end 
        bindKey(player,"l","down",light_func,player) 
        bindKey(player,"x","down",motor_func,player) 
    end 
end) 
  

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...