Jump to content

تصحيح كود بسيط


Recommended Posts

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

مرحبا شباب انا سويت مود الكيل

بس ما يشتغل غير مره حده

يعني لاعب واحد يكتب كيل و خلاص و ماعاد ايشتغل ابد

لازم اسيله ريستارت ليشتغل ن الاخر يعني ما يصير غير مره وحده

بخليكم مع الاكواد ^

addCommandHandler('kill',function(killl) 
    if not isPedInVehicle (killl) then 
    killPed = setTimer(killPed, 8000, 1, killl) 
    setElementFrozen (killl, true) 
    exports["guimessages"]:outputServer(killl, "you will killed after 10 second __ To cancel it write ckill", 0, 255, 0, false ) 
        end 
    end 
) 
  
function Respawn (killl) 
 setElementFrozen (killl, false) 
end 
addEventHandler ("onPlayerRespawn", killl, respawn) 
  
addCommandHandler('ckill', 
function(ckill) 
     cancelEvent { killPed = true } 
    setElementFrozen (ckill, false) 
exports["guimessages"]:outputServer(ckill, "you has been Successfully cancel it", 0, 255, 0, false ) 
end 
) 
  
  

Link to comment
kTable = {} 
  
addCommandHandler("kill", 
function(player) 
    if not isPedDead(player) and not isPedInVehicle(player) then 
        if not isTimer(kTable[player]) then 
            setElementFrozen(player, true) 
            kTable[player] = setTimer(function(player) 
                if isElement(player) then 
                    killPed(player) 
                    setElementFrozen(player, false) 
                end 
                kTable[player] = nil 
            end, 8000, 1, player) 
            exports["guimessages"]:outputServer(player, "you will killed after 10 second __ To cancel it write ckill", 0, 255, 0, false ) 
        end 
    end 
end) 
  
addCommandHandler("ckill", 
function(player) 
    if isTimer(kTable[player]) then 
        setElementFrozen(player, false) 
        exports["guimessages"]:outputServer(player, "you has been Successfully cancel it", 0, 255, 0, false) 
        killTimer(kTable[player]) 
        kTable[player] = nil 
    end 
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...