justn Posted March 28, 2014 Share Posted March 28, 2014 So i have made a group base for my group and there's a problem. when the player spawns maverick ( 487 ) it doesnt spawn in the location below, can anyone help me? No errors in debugscript 3 Client-Side addEventHandler ("onClientGUIClick", TMZGroup_Spawn, function (button, state, absoluteX, absoluteYe) trigger(getLocalPlayer()) local name = guiGridListGetItemText( TMZGroup_Gridlist, guiGridListGetSelectedItem ( TMZGroup_Gridlist ), 1 ) triggerServerEvent('TMZ', getLocalPlayer(), name) end) Server-Side AircraftIdSpawn = { { 2254.8168945313, 547.88562011719, 25.22902}, { 2334.2194824219, 544.73132324219, 25.261749267578}, } TableCars = {} addEvent('TMZ', true) addEventHandler('TMZ', root, function( nameCar ) if isElement( TableCars[source] ) then destroyElement( TableCars[source] ) end local id = getVehicleModelFromName( nameCar ) if id == 487 then local x, y, z = unpack( AircraftIdSpawn[math.random(#AircraftIdSpawn)] ) TableCars[source] = createVehicle( id, x, y, z ) if not TableCars[source] then return end warpPedIntoVehicle ( source, TableCars[source] ) setVehicleColor(veh[source], 0, 0, 150) return end local x,y,z = getElementPosition( source ) TableCars[source] = createVehicle( id, x,y,z ) if not TableCars[source] then return end warpPedIntoVehicle ( source, TableCars[source] ) addVehicleUpgrade(TableCars[source], 1147) addVehicleUpgrade(TableCars[source], 1041) addVehicleUpgrade(TableCars[source], 1035) addVehicleUpgrade(TableCars[source], 1010) addVehicleUpgrade(TableCars[source], 1171) addVehicleUpgrade(TableCars[source], 1149) end ) Link to comment
WhoAmI Posted March 28, 2014 Share Posted March 28, 2014 local table = AircraftIdSpawn [ math.random ( #AircraftIdSpawn ) ] createVehicle ( id, table [ 1 ], table [ 2 ], table [ 3 ] ) Link to comment
justn Posted March 28, 2014 Author Share Posted March 28, 2014 It's still not working. Update: Nevermind, Fixed it myself ! 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