Jump to content

Im looking for help with a respawn command pls


blackberry

Recommended Posts

Posted

Hello,im trying to figure out how can i respawn a player that his death(i mean bring him back to life)

The gamemode is Deathmatch (Race DD/DM)

i know my script should contain

  
function pmFindPlayer ( text ) 
    local player = getPlayerFromName ( text ) 
    if ( player ) then return player end 
    local lowtext = string.lower ( text ) 
    for id , player in ipairs ( getElementsByType ( "player" ) ) do 
        if ( string.find ( string.lower ( getPlayerName ( player ) ), lowtext , 1 , true ) ) then 
            return player 
        end 
    end 
    return false 
end 

And i know it should find where to respawn someone (i mean find the map respawn)

At the end,i will be able to put the admin command only for admins

Thanks for help and dont be shy for questions!! :D

Posted

Read the wiki on how command handlers work. Also check out the function lists and get to know it. You can easily teach yourself how to make good scripts and you will be really proud of yourself when you make your first thing. Just go check out development.mtasa.com

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