Jump to content

طلب كود


Recommended Posts

يقصد اذا مت بالريس . .

تموت بمكان معين ..

يبيه يرجع لنفس المكان . .

ماقترح تسويه طيب لو مات بالمويه ؟

عالعموم .,

Event : onPlayerWasted 

getElementPosition 

spawnPlayer 
Link to comment

function getMapData(data,valueData) ------- Function Hassan 
    if ( data and valueData ) then 
        for i,v in ipairs(getElementsByType(data)) do 
            if ( v ) then 
                local value = getElementData(v,valueData) 
                if ( value ) then 
                    return value 
                else 
                    return outputDebugString("Bad Argument value data .",1) 
                end 
            else 
                return outputDebugString("Bad Argument data .",1) 
            end 
        end 
    else 
        return outputDebugString("Please Add data / value data .",1) 
    end 
end 
  
addCommandHandler( "addMe", function( player ) 
    local id = getMapData("spawnpoint","vehicle") 
    local px = getMapData("spawnpoint","posX") 
    local py = getMapData("spawnpoint","posY") 
    local pz = getMapData("spawnpoint","posZ") 
    local rx = getMapData("spawnpoint","rotX") 
    local ry = getMapData("spawnpoint","rotY") 
    local rz = getMapData("spawnpoint","rotZ") 
    if ( id and px and py and pz and rx and ry and rz ) then 
       if ( getPedOccupiedVehicle( player ) ) then 
           setElementModel( getPedOccupiedVehicle( player ), tonumber( id ) ) 
           setElementPosition( getPedOccupiedVehicle( player ), px, py, pz ) 
           setElementRotation( getPedOccupiedVehicle( player ), rx, ry, rz ) 
        end 
    end 
end )  
Link to comment
function getMapData(data,valueData) ------- Function Hassan 
    if ( data and valueData ) then 
        for i,v in ipairs(getElementsByType(data)) do 
            if ( v ) then 
                local value = getElementData(v,valueData) 
                if ( value ) then 
                    return value 
                else 
                    return outputDebugString("Bad Argument value data .",1) 
                end 
            else 
                return outputDebugString("Bad Argument data .",1) 
            end 
        end 
    else 
        return outputDebugString("Please Add data / value data .",1) 
    end 
end 
  
addCommandHandler( "addMe", function( player ) 
    local id = getMapData("spawnpoint","vehicle") 
    local px = getMapData("spawnpoint","posX") 
    local py = getMapData("spawnpoint","posY") 
    local pz = getMapData("spawnpoint","posZ") 
    local rx = getMapData("spawnpoint","rotX") 
    local ry = getMapData("spawnpoint","rotY") 
    local rz = getMapData("spawnpoint","rotZ") 
    if ( id and px and py and pz and rx and ry and rz ) then 
       if ( getPedOccupiedVehicle( player ) ) then 
           setElementModel( getPedOccupiedVehicle( player ), tonumber( id ) ) 
           setElementPosition( getPedOccupiedVehicle( player ), px, py, pz ) 
           setElementRotation( getPedOccupiedVehicle( player ), rx, ry, rz ) 
        end 
    end 
end )  

سيرفر ؟

Link to comment
function getMapData(data,valueData) ------- Function Hassan 
    if ( data and valueData ) then 
        for i,v in ipairs(getElementsByType(data)) do 
            if ( v ) then 
                local value = getElementData(v,valueData) 
                if ( value ) then 
                    return value 
                else 
                    return outputDebugString("Bad Argument value data .",1) 
                end 
            else 
                return outputDebugString("Bad Argument data .",1) 
            end 
        end 
    else 
        return outputDebugString("Please Add data / value data .",1) 
    end 
end 
  
addCommandHandler( "addMe", function( player ) 
    local id = getMapData("spawnpoint","vehicle") 
    local px = getMapData("spawnpoint","posX") 
    local py = getMapData("spawnpoint","posY") 
    local pz = getMapData("spawnpoint","posZ") 
    local rx = getMapData("spawnpoint","rotX") 
    local ry = getMapData("spawnpoint","rotY") 
    local rz = getMapData("spawnpoint","rotZ") 
    if ( id and px and py and pz and rx and ry and rz ) then 
       if ( getPedOccupiedVehicle( player ) ) then 
           setElementModel( getPedOccupiedVehicle( player ), tonumber( id ) ) 
           setElementPosition( getPedOccupiedVehicle( player ), px, py, pz ) 
           setElementRotation( getPedOccupiedVehicle( player ), rx, ry, rz ) 
        end 
    end 
end )  

سيرفر ؟

yup

Link to comment
function getMapData(data,valueData) ------- Function Hassan 
    if ( data and valueData ) then 
        for i,v in ipairs(getElementsByType(data)) do 
            if ( v ) then 
                local value = getElementData(v,valueData) 
                if ( value ) then 
                    return value 
                else 
                    return outputDebugString("Bad Argument value data .",1) 
                end 
            else 
                return outputDebugString("Bad Argument data .",1) 
            end 
        end 
    else 
        return outputDebugString("Please Add data / value data .",1) 
    end 
end 
  
addCommandHandler( "addMe", function( player ) 
    local id = getMapData("spawnpoint","vehicle") 
    local px = getMapData("spawnpoint","posX") 
    local py = getMapData("spawnpoint","posY") 
    local pz = getMapData("spawnpoint","posZ") 
    local rx = getMapData("spawnpoint","rotX") 
    local ry = getMapData("spawnpoint","rotY") 
    local rz = getMapData("spawnpoint","rotZ") 
    if ( id and px and py and pz and rx and ry and rz ) then 
       if ( getPedOccupiedVehicle( player ) ) then 
           setElementModel( getPedOccupiedVehicle( player ), tonumber( id ) ) 
           setElementPosition( getPedOccupiedVehicle( player ), px, py, pz ) 
           setElementRotation( getPedOccupiedVehicle( player ), rx, ry, rz ) 
        end 
    end 
end )  

ابي ترايقر سيرفر ^_^

سيرفر ؟

yup

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