XeRo Posted July 23, 2015 Posted July 23, 2015 Hi Can You Help Me. I want Somebody with money such as Nitro Userpanel My Nitro Code (Server-side) addEvent("nitroPickup", true) addEventHandler("nitroPickup", getRootElement(), function(player) if isPedInVehicle(source) then addVehicleUpgrade(getPedOccupiedVehicle(source),1010) end end ) My Client Code (Client-side) addEventHandler("onClientGUIClick",root, function() if source == Nitro then triggerServerEvent("nitroPickup", getLocalPlayer()) local sound = playSound("pickup.mp3") setSoundVolume(sound, 0.5) end end ) Destruction Derby UserPanel%15
XeRo Posted July 23, 2015 Author Posted July 23, 2015 any error in debugscript 3? No, There's No Problem. I want the user Panel as well as take money with Nitro I have DD server. Custom Panel I did but I want to take with the benefit of the user panel Nitro? Destruction Derby UserPanel%15
BluntZ Posted July 23, 2015 Posted July 23, 2015 Zero Can you use Translator ? I cant understand what you really want Skype : Mohd.hamza35 facebook : https://www.facebook.com/MrBluntZ Still looking for any server to work on!
XeRo Posted July 23, 2015 Author Posted July 23, 2015 Zero Can you use Translator ? I cant understand what you really want Yes . Sorry my bad English Speak User Panel in The Player's Money with Nitro Purchased take want Destruction Derby UserPanel%15
TheSmart Posted July 23, 2015 Posted July 23, 2015 really i didn't get you but i think you need to buy nitro by money? so then use it addEvent("nitroPickup", true) addEventHandler("nitroPickup", getRootElement(), function(player) if isPedInVehicle(source) then addVehicleUpgrade(getPedOccupiedVehicle(source),1010) takePlayerMoney ( player, 1000 ) outputChatBox ( "You Bought a Nitro", getRootElement(), 0, 0, 0, true ) else outputChatBox ( "You need 1000 to buy nitro", getRootElement(), 0, 0, 0, true ) end end )
XeRo Posted July 23, 2015 Author Posted July 23, 2015 really i didn't get you but i think you need to buy nitro by money?so then use it addEvent("nitroPickup", true) addEventHandler("nitroPickup", getRootElement(), function(player) if isPedInVehicle(source) then addVehicleUpgrade(getPedOccupiedVehicle(source),1010) takePlayerMoney ( player, 1000 ) outputChatBox ( "You Bought a Nitro", getRootElement(), 0, 0, 0, true ) else outputChatBox ( "You need 1000 to buy nitro", getRootElement(), 0, 0, 0, true ) end end ) User Panel of Own It creates money with Purchased take Nitro ? Pİcture ScreenShot Upload ? Destruction Derby UserPanel%15
XeRo Posted July 23, 2015 Author Posted July 23, 2015 what you mean really? I want to Allow Purchased with money Destruction Derby UserPanel%15
TheSmart Posted July 23, 2015 Posted July 23, 2015 addEvent("nitroPickup", true) addEventHandler("nitroPickup", getRootElement(), function(player) if isPedInVehicle(source) then addVehicleUpgrade(getPedOccupiedVehicle(source),1010) takePlayerMoney ( player, 1000 ) outputChatBox ( "You Bought a Nitro", getRootElement(), 0, 0, 0, true ) else outputChatBox ( "You need 1000 to buy nitro", getRootElement(), 0, 0, 0, true ) end end )
SpecT Posted July 23, 2015 Posted July 23, 2015 addEvent("nitroPickup", true) addEventHandler("nitroPickup", getRootElement(), function(player) if isPedInVehicle(source) then local account = getPlayerAccount(player) if account then if getAccountData(account,"cash") >= 1000 then --- change the string "cash" to what the money data is saved (cash,money) addVehicleUpgrade(getPedOccupiedVehicle(source),1010) setAccountData(account,"cash",-1000) --- change the string "cash" to what the money data is saved (cash,money) outputChatBox ( "You Bought a Nitro", player, 0, 0, 0, true ) else outputChatBox ( "You need 1000 to buy nitro", getRootElement(), 0, 0, 0, true ) end end end end )
The Don Posted July 23, 2015 Posted July 23, 2015 -- Client addEventHandler("onClientGUIClick",root, function() if source == Nitro then triggerServerEvent("nitroPickup", localPlayer) local sound = playSound("pickup.mp3") setSoundVolume(sound, 0.5) end end ) --Server addEvent("nitroPickup", true) addEventHandler("nitroPickup", root, function ( ) if getPlayerMoney(source) >= 1000 then if isPedInVehicle(source) then addVehicleUpgrade(getPedOccupiedVehicle(source),1010) takePlayerMoney(source,1000) else outputChatBox ("You're poor m8",source,255,0,0) end end end ) آن يكون فكر المرء مختلآ , خيرآ من آن يكون فكره محتلآ ! my nick name in the game : =x=|DoN|=x= or 7eJAzZy- ( ͡° ͜ʖ ͡°) http://community.multitheftauto.com/ind ... &id=337164 my profile
XeRo Posted July 23, 2015 Author Posted July 23, 2015 (edited) Error Please Help Me. server.lua Code addEvent("nitroPickup", true) addEventHandler("nitroPickup", getRootElement(), function(player) if isPedInVehicle(source) then local account = getPlayerAccount(player) if account then if getAccountData(account,"cash") >= 1000 then --- change the string "cash" to what the money data is saved (cash,money) addVehicleUpgrade(getPedOccupiedVehicle(source),1010) setAccountData(account,"cash",-1000) --- change the string "cash" to what the money data is saved (cash,money) outputChatBox ( "Buy Nitro [$1000 ]", player, 0, 0, 0, true ) else outputChatBox ( "You enough to money", getRootElement(), 0, 0, 0, true ) end end end end ) Edited July 23, 2015 by Guest Destruction Derby UserPanel%15
GTX Posted July 23, 2015 Posted July 23, 2015 addEvent("nitroPickup", true) addEventHandler("nitroPickup", getRootElement(), function() if isPedInVehicle(source) then local account = getPlayerAccount(source) if account then if getAccountData(account,"cash") >= 1000 then --- change the string "cash" to what the money data is saved (cash,money) addVehicleUpgrade(getPedOccupiedVehicle(source),1010) setAccountData(account,"cash",(getAccountData(account,"cash") or 0)-1000) --- change the string "cash" to what the money data is saved (cash,money) outputChatBox ( "Buy Nitro [$1000 ]", source, 0, 0, 0, true ) else outputChatBox ( "You enough to money", source, 0, 0, 0, true ) end end end end ) Do you require a paid scripter? Contact me! (Unavailable) Currently I am experienced in Lua, PHP, HTML, CSS, SQL and JS. Developer and owner of https://projectbea.st - Project Beast
XeRo Posted July 23, 2015 Author Posted July 23, 2015 addEvent("nitroPickup", true) addEventHandler("nitroPickup", getRootElement(), function() if isPedInVehicle(source) then local account = getPlayerAccount(source) if account then if getAccountData(account,"cash") >= 1000 then --- change the string "cash" to what the money data is saved (cash,money) addVehicleUpgrade(getPedOccupiedVehicle(source),1010) setAccountData(account,"cash",(getAccountData(account,"cash") or 0)-1000) --- change the string "cash" to what the money data is saved (cash,money) outputChatBox ( "Buy Nitro [$1000 ]", source, 0, 0, 0, true ) else outputChatBox ( "You enough to money", source, 0, 0, 0, true ) end end end end ) Error Please Fix . Destruction Derby UserPanel%15
XeRo Posted July 23, 2015 Author Posted July 23, 2015 HELP ME !!!!!!!!!!!!!!!! Destruction Derby UserPanel%15
SpecT Posted July 23, 2015 Posted July 23, 2015 Don't spam lel ... Post the server-side of the userpanel. BTW thanks GTX for editing the code I wrote (made it for 1-2 minutes cuz I had no time) and forgot to get the data and then remove the value ...
XeRo Posted July 23, 2015 Author Posted July 23, 2015 Don't spam lel ... Post the server-side of the userpanel.BTW thanks GTX for editing the code I wrote (made it for 1-2 minutes cuz I had no time) and forgot to get the data and then remove the value ... Please Fix I'm Bad Destruction Derby UserPanel%15
GTX Posted July 23, 2015 Posted July 23, 2015 No problem, toni And XeRo, don't spam! addEvent("nitroPickup", true) addEventHandler("nitroPickup", getRootElement(), function() if isPedInVehicle(source) then local account = getPlayerAccount(source) if account then if tonumber(getAccountData(account,"cash")) >= 1000 then --- change the string "cash" to what the money data is saved (cash,money) addVehicleUpgrade(getPedOccupiedVehicle(source),1010) setAccountData(account,"cash",(tonumber(getAccountData(account,"cash")) or 0)-1000) --- change the string "cash" to what the money data is saved (cash,money) outputChatBox ( "Buy Nitro [$1000 ]", source, 0, 0, 0, true ) else outputChatBox ( "You enough to money", source, 0, 0, 0, true ) end end end end ) Do you require a paid scripter? Contact me! (Unavailable) Currently I am experienced in Lua, PHP, HTML, CSS, SQL and JS. Developer and owner of https://projectbea.st - Project Beast
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