Jump to content

Help script


Death

Recommended Posts

This script is giving error in the next map in the beginning of the next map that u took hunter he kills some players

addEvent( "onPlayerPickUpRacePickup", true ) 
addEventHandler( "onPlayerPickUpRacePickup", root, 
    function( number, sort, model ) 
        if sort == "vehiclechange" then 
            if model == 425 then 
                outputChatBox( getPlayerName( source ).." #FFFFFFPegou Hunter", root, 255, 255, 255, true ) 
                setTimer( killPed, 60000, 1, root ) 
            end 
        end 
    end 
) 

Link to comment

I think he mean: When somebody reach the hunter from then in one minute kill all player's so the next map can start (votemap).

But he added a timer 60000 , so if the map end's in less that a minute(last player die) then the timer it's not killed so the player's are killed in the next map (after a minute).

So there should be added a check if map end's kill the timer. I leave this part for you @Solidsnake14 bk i need to recap LUA. (i made my last script long time ago)xD

Link to comment
addEvent ( "onPlayerPickUpRacePickup", true ) 
addEventHandler ( "onPlayerPickUpRacePickup", root, 
    function ( number, sort, model ) 
        if ( sort == "vehiclechange" ) then 
            if ( model == 425 ) then 
                outputChatBox ( getPlayerName ( source ).." #FFFFFFPegou Hunter", root, 255, 255, 255, true ) 
                theTimer = setTimer ( killPed, 60000, 1, root ) 
            end 
        end 
    end 
) 
  
addEvent ( "onMapStarting", true ) 
addEventHandler ( "onMapStarting", root, 
    function ( ) 
        if isTimer ( theTimer ) then 
            killTimer ( theTimer ) 
        end 
    end 
) 

Link to comment

try this

no tested

addEventHandler( "onPlayerPickUpRacePickup", getRootElement(), 
function(kill, sort, model) 
if sort == "vehiclechange" then 
    if model == 425 then 
     setTimer(killPed, 60000, 1, getRootElement() ) 
     outputChatBox( getPlayerName( source ).." #FFFFFFPegou Hunter", getRootElement(), 255, 255, 255, true ) 
        end 
    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...