Jump to content

Hud_Messages


FuriouZ

Recommended Posts

Posted

Hey!

I downloaded script called 'hud_messages' from community ,but i don't understand how use it . :roll:

I viewed this

topic ...but still nothing ...

So ,i need that for example ,if i die ,then it says in hud messages 'Venom died !' or somethin...

Thanks for helping !

Posted (edited)

ok no one don't help me .. :|

I explain more.

I have resource 'car locks'

function toggleVehicleLocked(thePlayer) 
    playervehicle=getPlayerOccupiedVehicle(thePlayer); 
    if(playervehicle) then 
        if(isVehicleLocked(playervehicle)) then 
            setVehicleLocked(playervehicle,false); 
            exports.hud_messages:showBox(Vehicle unlocked), player, 0, 255, 0, 200) 
        else 
            setVehicleLocked(playervehicle,true); 
            exports.hud_messages:showBox(Vehicle locked), player, 255, 0, 0, 200) 
        end 
    end 
end 

What is wrong here ?

Edited by Guest
Posted (edited)
It should work, unless the player don't get send. Or the hudmessages isn't running.

But it doesn't :| ,hudm_messages running... i cheked debugscript ,no errors ,also script is server-side

I really need it :?

EDIT:

Debugscript says something in line 25:

')' expected near 'unlocked' 

?

Edited by Guest
Posted

function toggleVehicleLocked(thePlayer) 
    playervehicle = getPlayerOccupiedVehicle(thePlayer); 
    if (playervehicle) then 
        if (isVehicleLocked(playervehicle)) then 
            setVehicleLocked(playervehicle,false); 
            exports.hud_messages:showBox(Vehicle unlocked.,thePlayer, 0, 255, 0, 200) 
        else 
            setVehicleLocked(playervehicle,true); 
            exports.hud_messages:showBox(Vehicle locked.,thePlayer, 255, 0, 0, 200) 
        end 
    end 
end 
Posted
function toggleVehicleLocked(thePlayer) 
    playervehicle = getPlayerOccupiedVehicle(thePlayer); 
    if (playervehicle) then 
        if (isVehicleLocked(playervehicle)) then 
            setVehicleLocked(playervehicle,false); 
            exports.hud_messages:showBox(Vehicle unlocked.,thePlayer, 0, 255, 0, 200) 
        else 
            setVehicleLocked(playervehicle,true); 
            exports.hud_messages:showBox(Vehicle locked.,thePlayer, 255, 0, 0, 200) 
        end 
    end 
end 

Doesn't work :|

Debug says

.lua:25: ')' expected near 'unlocked' 

Posted

The first argument in the function should be a string but you didn't use the quotation marks (you wrote Vehicle locked. but it should be "Vehicle locked.").

Posted
The first argument in the function should be a string but you didn't use the quotation marks (you wrote Vehicle locked. but it should be "Vehicle locked.").

FINALLY !

THANK YOU SO MUCH FOR HELPING ! :P

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...