Jump to content

طلب كود


#1Mr.AmeeD

Recommended Posts

function hpSlap ([youtube] sourcePlayer, command, targetPlayerName ) 
    -- check if the user has access to it first 
    if not hasObjectPermissionTo(sourcePlayer, "command.slap", false) then 
        outputChatBox ( "You cannot use this command.", sourcePlayer ) 
        return false 
    end 
    -- look up the player to be slapped 
    local targetPlayer = getPlayerFromName ( targetPlayerName ) 
    -- if there's a player with such name, 
    if targetPlayer then 
        -- subtract 20 from his health 
        setElementHealth ( targetPlayer, getElementHealth(targetPlayer) - 20 ) 
    else 
        -- otherwise, output an error message 
        outputChatBox ( "There is no player nam[/youtube]ed " .. targetPlayerName .. "!", sourcePlayer ) 
    end 
end 
-- add our function as a handler for "hpslap" 
addCommandHandler ( "hpslap", hpSlap ) 

مو فاهم وين احط ال 200 بظبط ؟

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