nony Posted July 25, 2012 Share Posted July 25, 2012 يا شباب بغيت اسأل ذا الكود في خطأ؟ buttons.nitro10x = guiCreateButton(20,10,90,75, "Nitro 10x", false, tap3) labels.price_nitro10x = guiCreateLabel(20,80,90,30, "R$:1.800", false, tap3) guiLabelSetHorizontalAlign(labels.price_nitro10x, "center", false) guiSetFont(labels.price_nitro10x, "default-bold-small") guiSetProperty( buttons.nitro10x, "HoverTextColour", "FFFFFF00" ) ----------------ربط الازرار---------------- elseif (source == buttons.nitro10x) then player = localPlayer local price_nitro10x = 500 money = getPlayerMoney (source) if (money >= price_nitro10x) and getPedOccupiedVehicle(player) then outputChatBox ("You bought #FF0000Nitro 10x #FFFFFFfor #00ff00$#FF0000"..price_nitro10x.."", 255, 255, 255, true) takePlayerMoney(price_nitro10x) addVehicleUpgrade( getPedOccupiedVehicle(player), 1010 ) elseif money <= 1800 then outputChatBox("You dont have enough money to buy Nitro 10x.", 255, 0, 0) elseif not getPedOccupiedVehicle(player) then outputChatBox("You should be in a vehicle.", 255, 0, 0) end end) وفيه كود لسيرفر ولا لا؟ Link to comment
nony Posted July 25, 2012 Author Share Posted July 25, 2012 كذا صح ولا خطأ؟ كلنت buttons.nitro10x = guiCreateButton(20,10,90,75, "Nitro 10x", false, tap3) labels.price_nitro10x = guiCreateLabel(20,80,90,30, "R$:1.800", false, tap3) guiLabelSetHorizontalAlign(labels.price_nitro10x, "center", false) guiSetFont(labels.price_nitro10x, "default-bold-small") guiSetProperty( buttons.nitro10x, "HoverTextColour", "FFFFFF00" ) --------------ربط الازرار------------------ elseif (source == buttons.nitro10x) then player = localPlayer local price_nitro10x = 500 money = getPlayerMoney (source) سيرفر if (money >= price_nitro10x) and getPedOccupiedVehicle(player) then outputChatBox ("You bought #FF0000Nitro 10x #FFFFFFfor #00ff00$#FF0000"..price_nitro10x.."", 255, 255, 255, true) takePlayerMoney(price_nitro10x) addVehicleUpgrade( getPedOccupiedVehicle(player), 1010 ) elseif money <= 1800 then outputChatBox("You dont have enough money to buy Nitro 10x.", 255, 0, 0) elseif not getPedOccupiedVehicle(player) then outputChatBox("You should be in a vehicle.", 255, 0, 0) end end) Link to comment
hassan.k.s.a Posted July 25, 2012 Share Posted July 25, 2012 انت وش ناوي تسوي بضبط لأنه كله مخلبص Link to comment
nony Posted July 25, 2012 Author Share Posted July 25, 2012 هههههههههههه ذا نيترو الي في الشوب بس عدلت عليه الحين اعطيك كودات Link to comment
hassan.k.s.a Posted July 25, 2012 Share Posted July 25, 2012 تفضل جرب هاذا اي خطاأ قولي --server side-- addEvent("nitro-1", true) addEventHandler("nitro-1", getRootElement(), function() local PlayerMoney = getPlayerMoney(source) if ( PlayerMoney >= 1800) then takePlayerMoney(source,1800) if isPedInVehicle(source) then addVehicleUpgrade(getPedOccupiedVehicle(source), 1010) local name = getPlayerName(source) outputChatBox("تم اضافةالنتيرو لتشغيله اضغط CTRL", source, 255, 255, 0, true) else outputChatBox("انت لست بسيارتك", source, 255, 0, 0, true) end end end) --client side-- n1 = guiCreateButton(252,296,100,28,"نيترو-1",false,tab3) Lnetro = guiCreateLabel(252,320,90,30,"Buy=$1800",false,tab3) ---------------------Link Button------------ addEventHandler("onClientGUIClick", SaveChangesButton, accept, false) function onGuiClick (button, state, absoluteX, absoluteY) if (source == n1) then triggerServerEvent ("nitro-1", getLocalPlayer()) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) -----------Color Button----------- guiSetProperty(n1, "NormalTextColour", "FF00FF00") guiSetProperty(n1, "HoverTextColour", "FF00FF00") Link to comment
TAPL Posted July 26, 2012 Share Posted July 26, 2012 تفضل جرب هاذا اي خطاأ قولي--server side-- addEvent("nitro-1", true) addEventHandler("nitro-1", getRootElement(), function() local PlayerMoney = getPlayerMoney(source) if ( PlayerMoney >= 1800) then takePlayerMoney(source,1800) if isPedInVehicle(source) then addVehicleUpgrade(getPedOccupiedVehicle(source), 1010) local name = getPlayerName(source) outputChatBox("تم اضافةالنتيرو لتشغيله اضغط CTRL", source, 255, 255, 0, true) else outputChatBox("انت لست بسيارتك", source, 255, 0, 0, true) end end end) --client side-- n1 = guiCreateButton(252,296,100,28,"نيترو-1",false,tab3) Lnetro = guiCreateLabel(252,320,90,30,"Buy=$1800",false,tab3) ---------------------Link Button------------ addEventHandler("onClientGUIClick", SaveChangesButton, accept, false) function onGuiClick (button, state, absoluteX, absoluteY) if (source == n1) then triggerServerEvent ("nitro-1", getLocalPlayer()) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) -----------Color Button----------- guiSetProperty(n1, "NormalTextColour", "FF00FF00") guiSetProperty(n1, "HoverTextColour", "FF00FF00") تصحيح للسيرفر addEvent("nitro-1", true) addEventHandler("nitro-1", getRootElement(), function() local PlayerMoney = getPlayerMoney(source) if (PlayerMoney >= 1800) then if isPedInVehicle(source) then takePlayerMoney(source,1800) local name = getPlayerName(source) addVehicleUpgrade(getPedOccupiedVehicle(source), 1010) outputChatBox("تم اضافةالنتيرو لتشغيله اضغط CTRL", source, 255, 255, 0, true) else outputChatBox("انت لست بسيارتك", source, 255, 0, 0, true) end else outputChatBox("لايوجد معك مال كافي", source, 255, 0, 0, true) end end) Link to comment
nony Posted July 26, 2012 Author Share Posted July 26, 2012 يسلموووو حسون + تابل على التعديل الحين اشتغل تمام 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