Jump to content

مساعدة ..


Recommended Posts

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

ابي اعرف وش يسوي هالكود ؟

function onPlayerSpawn ( theSpawnpoint ) 
    killPlayerIfTheyPressThisKey ( source, "fire" ) -- start a repeating check 
end 
addEventHandler ( "onPlayerSpawn", root, onPlayerSpawn ) 
  
function killPlayerIfTheyPressThisKey ( thePlayer, key ) 
    if ( getControlState ( thePlayer, key ) ) then        -- if they're pressing the fire key 
        outputChatBox ( "Violence will not be tolerated!", thePlayer ) 
        killPed ( thePlayer )                          -- kill them 
    else                                                  -- otherwise.. 
        setTimer ( killPlayerIfTheyPressThisKey, 500, 1, thePlayer, key ) -- call this function again in 500ms 
    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...