Jump to content

help


Recommended Posts

--on hit the map ? 
addEvent('onClientResourceStart', resourceRoot, 
function() 
if (localPlayer == 'Here The variable') then 
toggleControl (localPlayer, 'sprint', false) 
end 
end) 
---or every time ? 
addEventHandler('onClientResourceStart', resourceRoot, 
function() 
toggleControl (localPlayer, 'fire', false) 
end) 

Updated Again .

Edited by Guest
Link to comment
Guest Guest4401
--on hit the map ? 
addEvent('onClientResourceStart', resourceRoot, 
function(player) 
if (player == 'Here The variable') then 
toggleControl (player, 'sprint', false) 
end 
end) 
---or every time ? 
addEventHandler('onClientResourceStart', resourceRoot, 
function(player) 
toggleControl (player, 'fire', false) 
end) 

It's addEventHandler and not addEvent (Line 2)

First parametre of onClientResourceStart is the resource, not a player.

So toggleControl(player,'sprint',false) will give an error

Edit: Now you changed it to source which isn't player either. It should be localPlayer.

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