Jump to content

scripting help


Pouloud

Recommended Posts

Hello everyone and thank you for reading this topic

I need help with a script

first of all:

I have a server with the Nerd Gaming gamemode. I would replace the original speedometer with one that has more functions (km, sql, turn light indicator)

I want it to work with my gamemode but I just started in script and I do not think being able to realize his own because the codes are a little different.

is anyone would be able to help me?

thank you in advance for your help

cordially

(Sorry for my bad english)

Link to comment

It's all about the logic behind it, put down on a piece of paper what you want to display and what you want to add/remove. Once you've got that, create it piece by piece. km state should be something with elementData, same goes for indicators. If you're stuck with a part of the script, make sure to come back here and we'll help you with what you've tried. (:

Link to comment

the problem is that I do not recognize the functions in the new script I think it is not in English

local [color=#FF0000]kapcsolat[/color] = exports["RB_Mains"]:getConnection()

 

function saveKilometer([color=#FF0000]jarmu[/color],km)

    exec = dbExec([color=#FF0000]kapcsolat[/color], "UPDATE vehicles SET traveled = ? WHERE ID = ?",km, getElementData(jarmu,"id"))

    if exec then

        outputDebugString("mentve",1)

    end 

end

addEvent("saveKilometer",true)

addEventHandler("saveKilometer",getRootElement(),saveKilometer)

Link to comment
the problem is that I do not recognize the functions in the new script I think it is not in English
local [color=#FF0000]kapcsolat[/color] = exports["RB_Mains"]:getConnection()

 

function saveKilometer([color=#FF0000]jarmu[/color],km)

    exec = dbExec([color=#FF0000]kapcsolat[/color], "UPDATE vehicles SET traveled = ? WHERE ID = ?",km, getElementData(jarmu,"id"))

    if exec then

        outputDebugString("mentve",1)

    end 

end

addEvent("saveKilometer",true)

addEventHandler("saveKilometer",getRootElement(),saveKilometer)

I can say for sure that those variables are not English. But recreating that wouldn't be too hard. :lol:

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