Jump to content

setTimer ?


TheMaysTRo

Recommended Posts

Posted (edited)

Hello.

i created a script that jail the attacker when he kill in sf . here is the code ----->

local tempCol = createColCuboid (-3465.8273925781,-883.77850341797,-9.0344648361206, 2500.0, 2500.0, 600.0 ) 
  
     
     
     
     
function player_Wasted ( ammo, attacker, weapon, bodypart ) 
    if ( attacker ) then 
        if ( getElementType ( attacker ) == "player" ) then 
if  isElementWithinColShape  (attacker,tempCol) then 
setElementPosition (attacker, 1178.6125488281,-1325.0550537109,14.128685951233 )  
outputChatBox ("#00D5FF["..getPlayerName(attacker).."] #FF0000Has Been Jailed For Killing in SF (2minutes) ",client,255,0,0,true) 
             
             
            end 
            end 
            end 
            end 
             

and i want to let the attacker go after 2 min by setting his position . but ididn't know how .

this is what i tried

setTimer (setElementPosition,120000,1 ,attacker,-1616.7896728516,678.30163574219,7.1875)  

but if he went to the jail at the last seconds he will be on the position at some seconds ...

or if there is 2 person jailed they will be warped together when someone time end . any idea how i can make it ?

Edited by Guest
Posted

It's setTimer, not setimer.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Do you get any error in debugscript? what is the problem?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
Do you get any error in debugscript? what is the problem?

No . This is not my problem , iwanted to know how to set a timer for each attacker , i mean if 2 entred jail and the timer end they will leave the jail the 2 not 1 . And how to make the timer work only when he entred not all time , cause if it work always he will leave in less of 2 min maybe 1sec or more.

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