Jump to content

كود


Recommended Posts

Posted

السلام عليكم ورحمة الله وبركاته

ابي كود يصك كل الاعبين فريز الا انا

StartFreezeلما اكتب في اف 8

يصك كل الاعبين الا انا

يفك الفريز عن الكل StopFreeze ولما اكتب

وشكرا مقدما

Posted
امسك الفنكشنات
  
--#Server 
addCommandHandler 
getElementsByType 
setElementFrozen 
  

حاول وبنساعدك

انا جديد بالبرمجة ما افهم شي :D

Posted
addCommandHandler("StartFreeze", 
  
function () 
  
for _,v in ipairs ( getElementsByType ( "player" ) ) do  
  
  
outputChatBox("--",root,0,255,0) 
  
  
setElementFrozen(v,true) 
  
  
end 
  
  
end 
  
  
) 
  
  
  
addCommandHandler("StopFreeze", 
  
function () 
  
for _,v in ipairs ( getElementsByType ( "player" ) ) do  
  
  
outputChatBox("--",root,0,255,0) 
  
setElementFrozen(v,false) 
  
  
end 
  
  
end 
  
  
) 

Posted
addCommandHandler("StartFreeze", 
  
function () 
  
for _,v in ipairs ( getElementsByType ( "player" ) ) do  
  
  
outputChatBox("--",root,0,255,0) 
  
  
setElementFrozen(v,true) 
  
  
end 
  
  
end 
  
  
) 
  
  
  
addCommandHandler("StopFreeze", 
  
function () 
  
for _,v in ipairs ( getElementsByType ( "player" ) ) do  
  
  
outputChatBox("--",root,0,255,0) 
  
setElementFrozen(v,false) 
  
  
end 
  
  
end 
  
  
) 

يعطيك العافية بس اللي راكب السيارة ما ينصك فريز

وابيه مايصكني فريز

كل اللي بالسيرفر ينصك الا انا

Posted
  
addCommandHandler("StartFreeze", 
  
function ( plr ) 
  
for _,v in ipairs ( getElementsByType ( "player" ) ) do 
  
  
outputChatBox("--",root,0,255,0) 
  
  
setElementFrozen(v,true) 
  
  
setElementFrozen(plr,false)  
  
end 
  
  
end 
  
  
) 
  
  
  
addCommandHandler("StopFreeze", 
  
function () 
  
for _,v in ipairs ( getElementsByType ( "player" ) ) do 
  
  
outputChatBox("--",root,0,255,0) 
  
setElementFrozen(v,false) 
  
  
end 
  
  
end 
  
  
) 
  

Posted
  
addCommandHandler("StartFreeze", 
  
function ( plr ) 
  
for _,v in ipairs ( getElementsByType ( "player" ) ) do 
  
  
outputChatBox("--",root,0,255,0) 
  
  
setElementFrozen(v,true) 
  
  
setElementFrozen(plr,false)  
  
end 
  
  
end 
  
  
) 
  
  
  
addCommandHandler("StopFreeze", 
  
function () 
  
for _,v in ipairs ( getElementsByType ( "player" ) ) do 
  
  
outputChatBox("--",root,0,255,0) 
  
setElementFrozen(v,false) 
  
  
end 
  
  
end 
  
  
) 
  

كل اللي بالسيرفر ينصك حتى اللي راكب السيارة ؟

Posted

اممم جرب كذا , ورداًَ على سؤالك الفريز نعم يجي على الاعب وهو يسوق اي شيء , يعني مهما كان يسوي الاعب الفريز يجيه يجيه

سويتها يتحقق من الي كتب الكلمه اذا انت مايعطيه فريز ويعطي الباقين طبعاً بواسطة السيريال نمبر حقك

[ serial ] F8 وعشان تجيب السيريال حقك ادخل اللعبه واكتب في

addCommandHandler ( "StartFreeze", function (  player ) 
    if ( getPlayerSerial ( player ) == "حط سيريالك هنا" ) then  
        return  
    setElementFrozen ( player, false ) 
end 
    for _,v in ipairs ( getElementsByType ( "player" ) ) do 
            setElementFrozen ( v, true ) 
        outputChatBox ( "* تم اعطاء الجميع فريز", v, 255, 255, 255, true ) 
    end 
end ) 
  
addCommandHandler ( "StopFreeze", function (    ) 
for _,v in ipairs ( getElementsByType ( "player" ) ) do 
            setElementFrozen ( v, false ) 
        outputChatBox ( "* تم فك الفريز من الجميع", v, 255, 255, 255, true ) 
    end 
end ) 
Posted

    function Freeze( player , cmd ) 
  
    if cmd == "StartFreeze" then 
  
    for i , Players in ipairs ( getElementsByType ( "player" ) ) do  
  
    if player ~= Players then 
  
    setElementFrozen ( Players , true ) 
  
    outputChatBox ( "Freeze All",Players ) 
  
                end 
            end 
        end 
         
    if cmd == "StopFreeze" then 
  
    for i , Players in ipairs ( getElementsByType ( "player" ) ) do  
  
    if player ~= Players then 
  
    setElementFrozen ( Players , false ) 
  
    outputChatBox ( "unFreeze All",Players )     
  
            end 
        end 
    end 
end 
addCommandHandler ( "StartFreeze", Freeze ) 
addCommandHandler ( "StopFreeze", Freeze ) 
Posted
اممم جرب كذا , ورداًَ على سؤالك الفريز نعم يجي على الاعب وهو يسوق اي شيء , يعني مهما كان يسوي الاعب الفريز يجيه يجيه

سويتها يتحقق من الي كتب الكلمه اذا انت مايعطيه فريز ويعطي الباقين طبعاً بواسطة السيريال نمبر حقك

[ serial ] F8 وعشان تجيب السيريال حقك ادخل اللعبه واكتب في

addCommandHandler ( "StartFreeze", function (  player ) 
    if ( getPlayerSerial ( player ) == "حط سيريالك هنا" ) then  
        return  
    setElementFrozen ( player, false ) 
end 
    for _,v in ipairs ( getElementsByType ( "player" ) ) do 
            setElementFrozen ( v, true ) 
        outputChatBox ( "* تم اعطاء الجميع فريز", v, 255, 255, 255, true ) 
    end 
end ) 
  
addCommandHandler ( "StopFreeze", function (    ) 
for _,v in ipairs ( getElementsByType ( "player" ) ) do 
            setElementFrozen ( v, false ) 
        outputChatBox ( "* تم فك الفريز من الجميع", v, 255, 255, 255, true ) 
    end 
end ) 

فيه بق

1464240886741.png

Posted
حط الكود في ملف سيرفر

ويتعدل

server

addCommandHandler ( "StartFreeze", function (  player ) 
    if ( getPlayerSerial ( player ) == "حط سيريالك هنا" ) then 
        return 
    setElementFrozen ( player, false ) 
end 
    for _,v in ipairs ( getElementsByType ( "player" ) ) do 
            setElementFrozen ( v, true ) 
        outputChatBox ( "* تم اعطاء الجميع فريز", v, 255, 255, 255, true ) 
    end 
end ) 
  

client

addCommandHandler ( "StopFreeze", function (    ) 
for _,v in ipairs ( getElementsByType ( "player" ) ) do 
            setElementFrozen ( v, false ) 
        outputChatBox ( "* تم فك الفريز من الجميع", v, 255, 255, 255, true ) 
    end 
end ) 

كذا ؟

Posted
حط الكود حق مستر ار بملف سيرفر فقط

لما احط سريالي ما اقدر اصك واللي مو محطوط سرياله يقدر يصك فريز ويفكه

وابي اللي بالسيارة ينصك فريز الا انا ما انصك

وشكرا :mrgreen:

Posted
addCommandHandler ("StartFreeze", 
function (plr) 
if getPlayerSerial (plr) == "سيريالك" then 
for i,k in ipairs (getElementsByType("player")) do 
setElementFrozen (k,true) 
setTimer(setElementFrozen,1000,1,plr,false) 
if isPedInVehicle (k) then 
setElementFrozen (getPedOccupiedVehicle(k),true) 
end 
setTimer(function(plr) 
if getPedOccupiedVehicle (plr) then 
setElementFrozen (getPedOccupiedVehicle(plr),false) 
end 
end,2000,1,plr) 
end 
outputChatBox ( "* تم اعطاء الجميع فريز", root, 255, 255, 0, true ) 
end 
end) 
  
addCommandHandler ( "StopFreeze",  
function (plr) 
if getPlayerSerial (plr) == "سيريالك" then 
for _,k in ipairs ( getElementsByType ( "player" )) do 
setElementFrozen ( k, false ) 
end 
for e,v in ipairs (getElementsByType("vehicle")) do 
setElementFrozen (v,false) 
end 
outputChatBox ( "* تم فك الفريز من الجميع", root, 255, 255, 255, true ) 
end 
end) 

Posted
addCommandHandler ("StartFreeze", 
function (plr) 
if getPlayerSerial (plr) == "سيريالك" then 
for i,k in ipairs (getElementsByType("player")) do 
setElementFrozen (k,true) 
setTimer(setElementFrozen,1000,1,plr,false) 
if isPedInVehicle (k) then 
setElementFrozen (getPedOccupiedVehicle(k),true) 
end 
setTimer(function(plr) 
if getPedOccupiedVehicle (plr) then 
setElementFrozen (getPedOccupiedVehicle(plr),false) 
end 
end,2000,1,plr) 
end 
outputChatBox ( "* تم اعطاء الجميع فريز", root, 255, 255, 0, true ) 
end 
end) 
  
addCommandHandler ( "StopFreeze",  
function (plr) 
if getPlayerSerial (plr) == "سيريالك" then 
for _,k in ipairs ( getElementsByType ( "player" )) do 
setElementFrozen ( k, false ) 
end 
for e,v in ipairs (getElementsByType("vehicle")) do 
setElementFrozen (v,false) 
end 
outputChatBox ( "* تم فك الفريز من الجميع", root, 255, 255, 255, true ) 
end 
end) 

كفو يعطيكم العافية :D

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