[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? Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
Dark Dragon Posted July 1, 2010 Posted July 1, 2010 it's destroyElement by the way Loads of fun for free! Also a lot of fun for free!
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 Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
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