Jump to content

Portal script error


S0rcerer

Recommended Posts

I create the script but i dont know why functions "giveWeapon ( ThePlayer, 24, 100 )","utputChatBox ("You portaled to mount", ThePlayer )" work, but "spawnplayer ( ThePlayer, -2351.5, -1630.8 , 483.6)" or "killplayer ( ThePlayer)" doesn't work.Read script and help me please.

  
  function portal ( ThePlayer, matchingDimension ) 
         
        outputChatBox ("You portaled to mount", ThePlayer ) 
         
        createBlipAttachedTo ( ThePlayer, 0, 2, 6, 0, 0, 140 ) 
       giveWeapon ( ThePlayer, 32 , 500 ) 
    giveWeapon ( ThePlayer, 42, 2000 ) 
    giveWeapon ( ThePlayer, 24, 100 ) 
    giveWeapon ( ThePlayer, 1, 1 ) 
        killplayer ( ThePlayer) 
  
  
end 
  
addEventHandler("onMarkerHit", getRootElement (), portal ) 
  
  
  
  
  
  

Link to comment
function portal ( ThePlayer, matchingDimension ) 
         
  outputChatBox ("You portaled to mount", ThePlayer ) 
  createBlipAttachedTo ( ThePlayer, 0, 2, 6, 0, 0, 140 ) 
  giveWeapon ( ThePlayer, 32 , 500 ) 
  giveWeapon ( ThePlayer, 42, 2000 ) 
  giveWeapon ( ThePlayer, 24, 100 ) 
  giveWeapon ( ThePlayer, 1, 1 ) 
  killPlayer ( ThePlayer) 
end 
addEventHandler("onMarkerHit", ThePlayer, portal ) 
  

addEventHandler("onMarkerHit", ThePlayer, portal ) 

maybe should be

addEventHandler("onMarkerHit", ThePlayer(), portal ) 

I dunno if this is made right now...

Plz give a screenshot on the error.

Link to comment

I have this problem again:

  
  
  
function skinner (  ) 
  
  
         
  
         
        wdwLogin = guiCreateWindow(5, 55, 4, 3, "Please Log In", false) 
         
         
end 
  
addEventHandler ( "onPlayerVehicleEnter", getRootElement ( ), skinner ) 

server log writes this

[17:47:31] ERROR: ...server/mods/deathmatch/resources/myserver/script.lua:333: attempt to call global 'guiCreateWindow' (a nil value) 

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