Nicolas ECM Posted December 11, 2013 Share Posted December 11, 2013 hi I could say I needed to grab the resource that serves me please help local tiempo = 3500 function makeAPed(thePlayer, command, skin) if (getTickCount ( ) - tiempo > 10000) then tiempo = getTickCount ( ) local x,y,z = getElementPosition(thePlayer) local rot = getElementRotation(thePlayer) local team = getPlayerTeam( thePlayer ) local myped = exports.slothbot:spawnBot( x , y - 2, z, 0, math.random ( 100, 105 ), 0, 0, akatsuki, 4, "fire", true ) setTimer (destroyElement, 50000, 1, myped) setTimer (createElement , 5100, 1, myped) else end end addCommandHandler("edo",makeAPed) Link to comment
Nicolas ECM Posted December 11, 2013 Author Share Posted December 11, 2013 what I want is to be a delay, it appears the bot say aparesca 3 seconds after you activate the command Link to comment
Castillo Posted December 11, 2013 Share Posted December 11, 2013 local tiempo = 3500 function makeAPed ( thePlayer, command, skin ) if ( getTickCount ( ) - tiempo > 10000 ) then tiempo = getTickCount ( ) setTimer ( function ( ) local x, y, z = getElementPosition ( thePlayer ) local rot = getElementRotation ( thePlayer ) local team = getPlayerTeam ( thePlayer ) local myped = exports.slothbot:spawnBot ( x , y - 2, z, 0, math.random ( 100, 105 ), 0, 0, akatsuki, 4, "fire", true ) setTimer ( destroyElement, 50000, 1, myped ) setTimer ( createElement, 5100, 1, myped ) end ,3000, 1 ) end end addCommandHandler ( "edo",makeAPed ) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now