[STM]Metalhero Posted July 1, 2010 Posted July 1, 2010 i hav ewirtie a bux itim but the ramp dont delete addCommandHandler ("buyramp", function(player,command) local playerCash = loadPlayerData (player,"cash") local playername = getPlayerName(player) local drivervehicle = getPedOccupiedVehicle(player) local x,y,z = getElementPosition(player) local X,Y,Z = getVehicleRotation(drivervehicle) if (tonumber(playerCash) > 99) then setTimer(function() t1 = createObject ( 1633, x, y, z, X, Y, Z )end,5000,1) setTimer ( "destroyObject", 10000, 1, t1 ) outputChatBox (getPlayerName(player) .. " #FF0000has bought Ramp(in 5 sec).",getRootElement(),51,255,0,true) savePlayerData (player,"cash",loadPlayerData(player,"cash") -100) else outputChatBox ("You cant bought Ramp, you need 100$ first!",player,255,0,0,false) end end) addEvent("onbuyramp",true) addEventHandler("onbuyramp",getRootElement(),buyramp)
dzek (varez) Posted July 1, 2010 Posted July 1, 2010 omfg setTimer ( "destroyObject", 10000, 1, t1 ) why in quotes?
dzek (varez) Posted July 1, 2010 Posted July 1, 2010 it's destroyElement by the way lol, true, when i saw the quotes i didnt read rest
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