Jump to content

RestartResource


#meS

Recommended Posts

Posted

Hello I want to restart a resource when player hit the marker

But it's not working

Code:

  
function lol() 
restartResource("run") 
end 
addEventHandler("onMarkerHit",marker3,lol) 

Posted
  
function lol() 
     restartResource(getResourceFromName('run')) 
end 
addEventHandler("onMarkerHit",marker3,lol) 

And don't forget, the function restartResource need ACL rights to work.

Posted

ok ok i want if the a resource with name gamemode restarted then i want it to set the player data joiner and the other things look but it doesn't work

Code:

  
lp = getLocalPlayer() 
  
function resman() 
local res = getResourceFromName ( "gamemode" ) 
if getElementData(lp,"logon") == true then 
guiSetVisible(GUImain.window[1],true) 
setElementData(lp,"joiner",true) 
showCursor ( true ) 
end 
end 
addEventHandler("onClientResourceStart",res,resman) 

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