Jump to content

[Help] Warp problem


Hero192

Recommended Posts

Hello guys, i have a problem im making an system that when you click a button you warp from => To

Other possition works succesfully but only SF doesn't works when you click on the SF Button it gives this error:

WARNING: server.lua:2: Bad argument @ 'setPedRoation' [Expected element at argument 1,got nil]

server side:

function setPedSpawnCity (player,x,y,z,I,D,R) 
setElementPosition (player,x,y,z) 
setElementInterior (player,I) 
setElementDimension (player,D) 
setPedRotation (player,R) 
end 
  
function spawnLV(player) 
setPedSpawnCity (player,1683.73474, 1452.60303, 10.77120,0,0,270) 
outputChatBox("Was taken to the city Las Venturas successfully",player,0,255,0) 
fadeCamera (player,true, 1.0, 0, 0, 0 )       
end 
function spawnLS(player) 
setPedSpawnCity (player,1644.62012, -2245.79639, 13.48906,0,0,180) 
outputChatBox("Was taken to the city Los Santos successfully",player,0,255,0) 
fadeCamera (player,true, 1.0, 0, 0, 0 )  
end 
function spawnSF(player) 
setPedSpawnCity (player,-1425.28064, -292.23923, 14.14844,0,0,140) 
outputChatBox("Was taken to the city San Fierro successfully",player,0,255, 0) 
fadeCamera (player,true, 1.0, 0, 0, 0 )       
end 

--client side SF Button

function San_Fierro() 
   if (source == SF_button) then 
        guiSetVisible(window, false) 
        triggerServerEvent ("traveltoSF",localPlayer) 
      showCursor(false) 
      end 
    end 
addEventHandler("onClientGUIClick", SF_button, San_Fierro, false ) 

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