Hero192 Posted July 19, 2015 Share Posted July 19, 2015 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
Hero192 Posted July 19, 2015 Author Share Posted July 19, 2015 Never Mind i solved it alone Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now