Jump to content

حد يصلحلي الكود ذا


Recommended Posts

  
function Key1() 
local x,y,z = getElementPosition(source) 
local nn = createVehicle (411,x,y,z) 
warpPedIntoVehicle(source,nn) 
end 
bindKey("F1","down",Key1) 

WARNING: fff\Server.lua:6: Bad argument @ 'bindKey' [Expected player at argument 1, got string 'x']

حطه في كلنت و بدل source

بــ localPlayer

Link to comment
يا اخوان احمد ليبيا وعسم

ياخي الاكواد غلط غلط كان لازم من الاول احطه بكلانييت وخلااص خلااص

شكراً على كل حال

شرايك تجرب الكود ذذ ؟

  
bindKey("x","down", 
function() 
local x,y,z = getElementPosition(source) 
nn = createVehicle (411,x,y,z) 
warpPedIntoVehicle(source,nn) 
end 
) 
  

وحطه في الكلينت ولا تسوي دافور انه لازم سيرفر

Link to comment
يا اخوان احمد ليبيا وعسم

ياخي الاكواد غلط غلط كان لازم من الاول احطه بكلانييت وخلااص خلااص

شكراً على كل حال

شرايك تجرب الكود ذذ ؟

  
bindKey("x","down", 
function() 
local x,y,z = getElementPosition(source) 
nn = createVehicle (411,x,y,z) 
warpPedIntoVehicle(source,nn) 
end 
) 
  

وحطه في الكلينت ولا تسوي دافور انه لازم سيرفر

اخي لازمني كود لتنزيل السياره في سيرفر

لازم اسوي

triggerServerEvent

Link to comment

-- Client Side 
  
bindKey("x","down", 
function() 
local x,y,z = getElementPosition(localPlayer) 
nn = createVehicle (411,x,y,z) 
warpPedIntoVehicle(localPlayer,nn) 
end 
) 
  

وملاحظـة: بالكلنت السيارة وهمية والركوب بالسيارة وهمي

Link to comment

client

bindKey("x","down",

function()

triggerServerEvent("Mico",localPlayer)

end

)

 

server

addEvent ("Mico",true)

addEventHandler("Mico",root,

function()

local x,y,z = getElementPosition(source)

nn = createVehicle (411,x,y,z)

warpPedIntoVehicle(source,nn)

end

)

ياخي سويته لوحدي خلاص شكراً على كل حال

Edited by Guest
Link to comment
Veh = {  } 
bindKey("x","down", 
function ( ) 
    if ( Veh[source] ) then destroyElement(Veh[source]) end 
            local xPosition , yPosition , zPosition = getElementPosition ( source ) 
                   Veh[source] = createVehicle(id,xPosition+1 , yPosition+1 , zPosition,0,0,90) 
                       warpPedIntoVehicle(source,Veh[source]) 
end ) 

Link to comment
Veh = {  } 
bindKey("x","down", 
function ( ) 
    if ( Veh[source] ) then destroyElement(Veh[source]) end 
            local xPosition , yPosition , zPosition = getElementPosition ( source ) 
                   Veh[source] = createVehicle(id,xPosition+1 , yPosition+1 , zPosition,0,0,90) 
                       warpPedIntoVehicle(source,Veh[source]) 
end ) 

السورس غـير مـعـرف

Link to comment
Veh = {  } 
bindKey("x","down", 
function ( ) 
    if ( Veh[client] ) then destroyElement(Veh[client]) end 
            local xPosition , yPosition , zPosition = getElementPosition ( client ) 
                   Veh[client] = createVehicle(id,xPosition+1 , yPosition+1 , zPosition,0,0,90) 
                       warpPedIntoVehicle(client,Veh[client]) 
end ) 
function Destory( ) 
    if Vehcile[client] then 
        destroyElement(Vehcile[client]) 
        end 
    end  
addEventHandler("onPlayerWasted",getRootElement( ), Destory ) 
addEventHandler("onPlayerQuit",getRootElement( ), Destory ) 
addEventHandler("onVehicleExplode",getRootElement( ), Destory ) 

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