Jump to content

Not want to create vehicles help


Recommended Posts

server

addEvent( "aw1", true )  
function aw1(player,command,id) 
    local x,y,z = getElementPosition(player) 
    veh = createVehicle(560,x,y,z) 
    warpPedIntoVehicle(player,veh)  
    outputChatBox ( "Car Taken", source, 255, 0, 0 )  
end 
addEventHandler ( "aw1", getRootElement(), setaw1 ) 

client

aw1 = guiCreateStaticImage(22,23,250,130,"tab3/aw1.png",false, tab3  ) 
aw1 = guiCreateButton(22,265,130,40,"Take",false, tab3 ) 
guiSetProperty(aw1,"NormalTextColour", "FF00FF00") 
  
  
  
  
function onGuiClick (button, state, absoluteX, absoluteY) 
  if (source == aw1) then  
  triggerServerEvent ("aw1", getLocalPlayer())  
                             
  end 
end 
addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 

Help please

Link to comment

Try this

server-side

addEvent( "aw1", true ) 
function aw1() 
    local x,y,z = getElementPosition(source) 
    veh = createVehicle(560,x,y,z) 
    warpPedIntoVehicle(source,veh) 
    outputChatBox ( "Car Taken", source, 255, 0, 0 ) 
end 
addEventHandler ( "aw1", getRootElement(), aw1 ) 

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