Jump to content

طلب كود


xMr.SAAD

Recommended Posts

طيب

ممكن طلب

تصلح لي ذا كود

setTimer(setElementFrozen, 1000, 1, player, true)

setTimer(setElementFrozen, 10000, 1, player, false)

ذا كود رحت لـ ماركر يوقف لاعب فقط

ابيه يوقف حتا لو كان راكب سياره

Link to comment
createMarker --[[ أو ]] colshape 
setElementPosition 
outputChatBox 

+

Event: onMarkerHit or onColShapeHit

Functions:

getElementType 
getPedOccupiedVehicle 

setElementFrozen ( source, true )    - Freeze 
setTimer(setElementFrozen, 5000, 1, source, false)      -   unFreeze  بعد 5 ثواني 

. #

??

طيب

ممكن طلب

تصلح لي ذا كود

setTimer(setElementFrozen, 1000, 1, player, true)

setTimer(setElementFrozen, 10000, 1, player, false)

ذا كود رحت لـ ماركر يوقف لاعب فقط

ابيه يوقف حتا لو كان راكب سياره

* Server Side:

marker = createMarker ( x, y, z, "cylinder", size, r, g, b, alpha ) 
  
function setElementFrozen_ ( theElm, freezeStatus ) 
    if ( theElm ) and ( isElement ( theElm ) ) then 
        setElementFrozen ( theElm, freezeStatus ) 
    end 
end 
  
addEventHandler ( "onMarkerHit", marker, 
    function ( theElm ) 
        if ( getElementType ( theElm ) == "player" ) then 
            local vehicle = getPedOccupiedVehicle ( theElm ) 
            if ( vehicle ) then 
                setElementFrozen_ ( vehicle, true ) 
                setTimer ( setElementFrozen_, 10000, 1, vehicle, false ) 
            else 
                setElementFrozen_ ( theElm, true ) 
                setTimer ( setElementFrozen_, 10000, 1, theElm, false ) 
            end 
        end 
    end 
) 

. ملاحظة: عوض مكان المتغيرات أول سطر فقط لاتعدل شي تحته **

Link to comment

خليته لك اذا ضغطت الزر يسوي داتا للمود وينقلك للمكان الي تبيه واذا متت يرجعك في نفس المكان ذذ

-- Client Side# 
addEventHandler('onClientGUIClick',Button,function() 
    if not getElementData(resourceRoot,'Respawn') then setElementData(resourceRoot,'Respawn',true) end 
        setElementPosition(localPlayer,x,y,z) 
    end,false 
) 
  
addEventHandler('onClientPlayerSpawn',localPlayer,function() 
    if getElementData(resourceRoot,'Respawn') == true then 
        setElementPosition(localPlayer,x,y,z) 
        end 
    end 
) 

* Button = اسم الزر

* resourceRoot = localPlayer داتا للمود نفسه يعني حتى لو طلع ودخل ومات يرجع نفس المكان , اذا ماتبيها كذا بدلها بـ

Link to comment

addEventHandler("onClientGUIClick", root, function () 
if (source == الزر) then 
triggerServerEvent("team", localPlayer) 
end 
end 
) 

-- Server side # 
local team = createTeam("Team", 255, 0, 0) 
addEvent("team", true) 
addEventHandler("team", root, 
function () 
setPlayerTeam(client, team) 
end 
) 
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...