[STM]Metalhero Posted July 1, 2010 Share 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) Link to comment
dzek (varez) Posted July 1, 2010 Share Posted July 1, 2010 omfg setTimer ( "destroyObject", 10000, 1, t1 ) why in quotes? Link to comment
Dark Dragon Posted July 1, 2010 Share Posted July 1, 2010 it's destroyElement by the way Link to comment
[STM]Metalhero Posted July 1, 2010 Author Share Posted July 1, 2010 thx vearez and dragon Link to comment
dzek (varez) Posted July 1, 2010 Share Posted July 1, 2010 it's destroyElement by the way lol, true, when i saw the quotes i didnt read rest 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