MR.KING111 Posted August 13, 2012 Share Posted August 13, 2012 السلام عليكم ابي اكواد شوب 1-كود ارسال الفلوس 2- كود الدم و الدرع Link to comment
3NAD Posted August 13, 2012 Share Posted August 13, 2012 اططرح كودك واللي قدرت عليه .. ورآحح نصحح الأخطاء إن شاء الله Link to comment
hassan.k.s.a Posted August 13, 2012 Share Posted August 13, 2012 ض1 كل شي تبيه جاهز اعتمد على نفسك ولو بنسبة 30 بالميه Link to comment
TAPL Posted August 13, 2012 Share Posted August 13, 2012 دم https://wiki.multitheftauto.com/wiki/SetElementHealth درع https://wiki.multitheftauto.com/wiki/SetPedArmor Link to comment
Tete omar Posted August 13, 2012 Share Posted August 13, 2012 ض1 كل شي تبيه جاهزاعتمد على نفسك ولو بنسبة 30 بالميه ههههههه يا hassan.k.s.a انت متعود تحط المود جاهز https://forum.multitheftauto.com/viewtop ... e8dfb64ea8 اشبك اليوم ؟ Link to comment
hassan.k.s.a Posted August 13, 2012 Share Posted August 13, 2012 ههههههه مادري علي مزاجات ض2 لاكن يلا تفضل --server side-- addEvent('health',true) addEventHandler('health', root, function () if (getPlayerMoney(source) >= 3000) then takePlayerMoney (source,3000) setElementHealth(source,100) outputChatBox("* #0099ccSuccessfully bought Health #000000[ #ff0000-$2500 #000000]#00ff00 !",source,0,255,0,true) else --- dont use elseif this is good way .. outputChatBox("* you Don't have enough Money !",source,255,0,0,true) end end ) addEvent('armor',true) addEventHandler("armor", root, function () if (getPlayerMoney(source) >= 3000) then takePlayerMoney (source,3000) setPedArmor(source,100) outputChatBox("* #0099ccSuccessfully bought Armor #000000[ #ff0000-$2000 #000000]#00ff00 !",source,0,255,0,true) else outputChatBox("* you Don't have enough Money !",source,255,0,0,true) end end ) --client side-- armor = guiCreateButton(10,80,90,30,"$3000 Armor",false,TheWindow ) health = guiCreateButton(110,80,90,30,"$3000 health",false,TheWindow ) addEventHandler ("onClientGUIClick", root, function() if ( source == health ) then triggerServerEvent("health", localPlayer) elseif ( source == armor ) then triggerServerEvent("armor", localPlayer) end end) Link to comment
MR.KING111 Posted August 14, 2012 Author Share Posted August 14, 2012 اخر طلب ابي كود ارسال الفلوس ونزل الشوب حقي تكفون Link to comment
hassan.k.s.a Posted August 14, 2012 Share Posted August 14, 2012 --client side-- setTimer( function() playerList = guiCreateGridList(6, 6, 140, 460, false, tab4) guiGridListSetSelectionMode(playerList, 2) local cl = guiGridListAddColumn(playerList, "Players List ...", 0.85) if ( cl and guiGetVisible(GUIEditor_Window[1] ) == true ) then for _,name in ipairs(getElementsByType("player")) do local rw = guiGridListAddRow(playerList) guiGridListSetItemText(playerList, rw, cl, getPlayerName(name), false, false) end addEventHandler("onClientGUIClick", playerList, onClickPlayerName) end end ,4000,0) nameEdit = guiCreateEdit(160,150,200,30,"",false,tab4) amountEdit = guiCreateEdit(160,200,100,30,"",false,tab4) sendBTN = guiCreateButton(150,280,130,36, "send", false,tab4) -- function onClickPlayerName () local name = guiGridListGetItemText(playerList, guiGridListGetSelectedItem(playerList), 1) guiSetText(nameEdit, name) end addEventHandler("onClientGUIClick",getRootElement(), function() if ( source == sendBTN ) then playerNick = guiGetText(nameEdit) amount = guiGetText(amountEdit) triggerServerEvent("onSendMoney", getLocalPlayer(), playerNick, amount) end end) --server side-- addEvent("onSendMoney", true) addEventHandler("onSendMoney", getRootElement(), function(who, player) local money = getPlayerMoney(source) if tonumber(player) >= 200 then if tonumber(player) <= money then toWho = getPlayerFromName(who) if toWho ~= false then givePlayerMoney(toWho, player) takePlayerMoney(source, player) name = getPlayerName(source) outputChatBox("* You have given money amount of: #00ff00$" .. player .. " #0099ccto: #ff0000" .. who, source, 0, 150, 255, true) outputChatBox("* ".. name .. " #ff0000has given you money amount of: #00ff00$" .. player .. " #ff0000!", toWho, 255, 0, 0, true) else outputChatBox("* Player did not exist !", source, 255, 0, 0) end else outputChatBox("* you dont have enough money !", source, 255, 0, 0) end else outputChatBox("* the Less amount must be #00ff00$200 !", source, 255, 0, 0) end end ) 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