Jump to content

i need help for race scripting


Erhabi

Recommended Posts

addEvent("onPlayerFinish",true) -- add the custom event so our resource knows about it
addEventHandler("onPlayerFinish",getRootElement(), -- add an event handler for the event
function (rank,finishtime)
if rank == 1 then -- check if the player finished first
givePlayerMoney(source,100) -- give him 100$ if so
end
end
)

Link to comment

plzzz i need help the scrioting does not work

i created a file.lua in race folder

function win ( rank, finishtime )

if ( rank == 1 ) then

givePlayerMoney ( source, 100 )

end

end

addEvent ( "onPlayerFinish", true )

addEventHandler( "onPlayerFinish", getRootElement(), win )

but that not work

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