Jump to content

Help with it!


Victor214

Recommended Posts

Hey, I'm doing a script that is suposed to warp the player to the place I chosed, in the script I made the marker and where the player will be warped, when he get in the marker, there will be a fade out of 2 secs, a message will appear and the screen will be black for 7 seconds, then, and the message will be deleted and there will be a fade in of 2 sec, but 1 - I set the marker to be an arrow, not a cilinder. 2 - the fade in isn't working and I don't know if the marker disapeared (the goal is that it stay there forever).

  
local markert = createMarker(1960, -1583, 14,arrow , 1, 0, 255, 0, 200) 
  
function Teleport(thePlayer) 
  
local x = 3597 
local y = -2611 
local z = 1093 
  
setElementPosition(thePlayer, x, y, z, true) 
fadeCamera(thePlayer, false, 2) 
local Display = textCreateDisplay() 
textDisplayAddObserver (Display, thePlayer) 
local Text = textCreateTextItem ( "GSC's Base", 0.5, 0.5, 1, 0, 255, 0, 255, 6.0 ) 
setTimer(textDisplayAddText, 2000, 1, Display, Text ) 
setTimer(fadeCamera, 7000, 1, true, 2) 
setTimer(textDestroyDisplay, 7000, 1, Display) 
  
end 
addEventHandler("onMarkerHit", markert, Teleport) 
  

Link to comment

Try this:

local markert = createMarker(1960, -1583, 14, "arrow", 1, 0, 255, 0, 200) 
  
function Teleport(theMarker) 
local x = 3597 
local y = -2611 
local z = 1093 
  
setElementPosition(source, x, y, z, true) 
fadeCamera(source, false, 2) 
local Display = textCreateDisplay() 
textDisplayAddObserver (Display, source) 
local Text = textCreateTextItem ( "GSC's Base", 0.5, 0.5, 1, 0, 255, 0, 255, 6.0 ) 
setTimer(textDisplayAddText, 2000, 1, Display, Text ) 
setTimer(fadeCamera, 7000, 1, source, true, 2) 
setTimer(textDestroyDisplay, 7000, 1, Display) 
end 
addEventHandler("onPlayerMarkerHit", markert, Teleport) 

Link to comment

This isn't a hard script for you, this is just a VERY basic script for you, but anyway, you are THE BEST SCRIPT ever, thx castillo =D

I changed everything that was "theMarker" and "source" for "thePlayer", it wasn't working with "theMarker" and "source", realy thanks castilo!

Edited by Guest
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...