Jump to content

TAPL

Retired Staff
  • Posts

    7,337
  • Joined

  • Days Won

    11

Everything posted by TAPL

  1. Nope, work with me.
  2. I don't understand, you have already other topic and answered already. https://forum.multitheftauto.com/viewtopic.php?f=91&t=48495
  3. ما يجي فيه عربي setPlayerName بس ذول !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ لازم تسوي ألمنت داتا مثال setElementData(player, "name", "الأسم عربي هنا") getPlayerName و بعدها بدل ما تستخدم getElementData أستخدم في كل المودات getPlayerName يعني تغير كل أكواد getElementData بـ مثال getElementData(player, "name")
  4. TAPL

    [REL] VIP System

    Say this to Mr.T9, not me lol.
  5. -- Server Side -- local price_chainsaw = "400" local price_m4 = "250" local price_ak = "200" local price_tec9 = "450" local price_mp5 = "150" local price_knife = "500" local price_uzi = "400" local price_sniper = "250" local price_shotgun = "200" local price_spaz12 = "650" local price_deserteagle = "150" local price_molotovcocktails= "1000" local price_rifle = "100" local price_satchel = "1800" local price_grenade = "1500" function BuyWeaponOnServer(weapon_name) local player_money = getPlayerMoney(source) if(weapon_name == "weapon_chainsaw") then if(player_money >= tonumber(price_chainsaw)) then giveWeapon(source, 9) takePlayerMoney(source, tonumber(price_chainsaw)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_m4") then if(player_money >= tonumber(price_m4)) then giveWeapon(source, 31, 450) takePlayerMoney(source, tonumber(price_m4)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_ak") then if(player_money >= tonumber(price_ak)) then giveWeapon(source, 30, 450) takePlayerMoney(source, tonumber(price_ak)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_tec9") then if(player_money >= tonumber(price_tec9)) then giveWeapon(source, 32, 450) takePlayerMoney(source, tonumber(price_tec9)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_mp5") then if(player_money >= tonumber(price_mp5)) then giveWeapon(source, 29, 450) takePlayerMoney(source, tonumber(price_mp5)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_knife") then if(player_money >= tonumber(price_knife)) then giveWeapon(source, 4) takePlayerMoney(source, tonumber(price_knife)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_uzi") then if(player_money >= tonumber(price_uzi)) then giveWeapon(source, 28, 450) takePlayerMoney(source, tonumber(price_uzi)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_sniper") then if(player_money >= tonumber(price_sniper)) then giveWeapon(source, 34, 450) takePlayerMoney(source, tonumber(price_sniper)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_shotgun") then if(player_money >= tonumber(price_shotgun)) then giveWeapon(source, 25, 450) takePlayerMoney(source, tonumber(price_shotgun)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_spaz12") then if(player_money >= tonumber(price_spaz12)) then giveWeapon(source, 27, 450) takePlayerMoney(source, tonumber(price_spaz12)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_deserteagle") then if(player_money >= tonumber(price_deserteagle)) then giveWeapon(source, 24, 450) takePlayerMoney(source, tonumber(price_deserteagle)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_molotovcocktails") then if(player_money >= tonumber(price_molotovcocktails)) then giveWeapon(source, 18, 10) takePlayerMoney(source, tonumber(price_molotovcocktails)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_rifle") then if(player_money >= tonumber(price_rifle)) then giveWeapon(source, 33, 200) takePlayerMoney(source, tonumber(price_rifle)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_satchel") then if(player_money >= tonumber(price_satchel)) then giveWeapon(source, 39, 10) takePlayerMoney(source, tonumber(price_satchel)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_grenade") then if(player_money >= tonumber(price_grenade)) then giveWeapon(source, 16, 10) takePlayerMoney(source, tonumber(price_grenade)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end end end addEvent("onClientBuyWeapon", true) addEventHandler("onClientBuyWeapon", root, BuyWeaponOnServer) -- Client Side -- GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(119,119,815,504,"ShopWeapon By KING-ABADY {Saudi}~{Zombie}",false) guiWindowSetSizable(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[1],false) GUIEditor_Image[1] = guiCreateStaticImage(203,162,85,78,"images/1.png",false,GUIEditor_Window[1]) GUIEditor_Image[2] = guiCreateStaticImage(28,167,106,68,"images/2.png",false,GUIEditor_Window[1]) GUIEditor_Image[3] = guiCreateStaticImage(505,390,117,61,"images/3.png",false,GUIEditor_Window[1]) GUIEditor_Image[4] = guiCreateStaticImage(684,368,95,87,"images/4.png",false,GUIEditor_Window[1]) GUIEditor_Image[5] = guiCreateStaticImage(60,269,88,78,"images/5.png",false,GUIEditor_Window[1]) GUIEditor_Image[6] = guiCreateStaticImage(199,270,86,81,"images/20.png",false,GUIEditor_Window[1]) GUIEditor_Image[7] = guiCreateStaticImage(320,282,135,59,"images/25.png",false,GUIEditor_Window[1]) GUIEditor_Image[8] = guiCreateStaticImage(541,266,70,84,"images/26.png",false,GUIEditor_Window[1]) GUIEditor_Image[9] = guiCreateStaticImage(32,403,125,66,"images/28.png",false,GUIEditor_Window[1]) GUIEditor_Image[10] = guiCreateStaticImage(189,377,129,87,"images/29.png",false,GUIEditor_Window[1]) GUIEditor_Image[11] = guiCreateStaticImage(336,400,117,63,"images/27.png",false,GUIEditor_Window[1]) GUIEditor_Image[12] = guiCreateStaticImage(326,172,136,62,"images/30.png",false,GUIEditor_Window[1]) GUIEditor_Image[13] = guiCreateStaticImage(493,171,153,56,"images/31.png",false,GUIEditor_Window[1]) GUIEditor_Image[14] = guiCreateStaticImage(652,273,127,70,"images/32.png",false,GUIEditor_Window[1]) GUIEditor_Image[15] = guiCreateStaticImage(683,166,113,70,"images/33.png",false,GUIEditor_Window[1]) GUIEditor_Image[16] = guiCreateStaticImage(45,19,122,110,"images/H.png",false,GUIEditor_Window[1]) GUIEditor_Image[17] = guiCreateStaticImage(330,16,123,119,"images/A.png",false,GUIEditor_Window[1]) GUIEditor_Image[18] = guiCreateStaticImage(486,15,131,121,"images/J.png",false,GUIEditor_Window[1]) GUIEditor_Image[19] = guiCreateStaticImage(187,17,124,117,"images/M.png",false,GUIEditor_Window[1]) GUIEditor_Image[20] = guiCreateStaticImage(653,13,129,127,"images/S.png",false,GUIEditor_Window[1]) GUIEditor_Button[16] = guiCreateButton(63,125,82,27,"1000$",false,GUIEditor_Window[1]) GUIEditor_Button[17] = guiCreateButton(209,126,82,27,"2000$",false,GUIEditor_Window[1]) GUIEditor_Button[18] = guiCreateButton(355,125,82,27,"1500$",false,GUIEditor_Window[1]) GUIEditor_Button[19] = guiCreateButton(514,125,82,27,"2000$",false,GUIEditor_Window[1]) speed = guiCreateButton(677,125,82,27,"3000$",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(9,149,803,15,"___________________________________________________________________________________________________________________",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],0,0,255) GUIEditor_Label[2] = guiCreateLabel(9,258,803,15,"___________________________________________________________________________________________________________________",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],0,255,0) GUIEditor_Label[3] = guiCreateLabel(10,371,804,22,"___________________________________________________________________________________________________________________",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[3],255,0,0) btn_buy_deserteagle = guiCreateButton(61,240,83,23,"150$",false,GUIEditor_Window[1]) btn_buy_knife = guiCreateButton(200,239,83,23,"500$",false,GUIEditor_Window[1]) btn_buy_ak = guiCreateButton(359,239,83,23,"200$",false,GUIEditor_Window[1]) btn_buy_m4 = guiCreateButton(546,239,83,23,"250$",false,GUIEditor_Window[1]) btn_buy_mp5 = guiCreateButton(707,239,83,23,"150$",false,GUIEditor_Window[1]) btn_buy_grenade = guiCreateButton(58,352,83,23,"1500$",false,GUIEditor_Window[1]) btn_buy_uzi = guiCreateButton(200,352,83,23,"400$",false,GUIEditor_Window[1]) btn_buy_rifle = guiCreateButton(360,352,83,23,"100$",false,GUIEditor_Window[1]) btn_buy_molotovcocktails = guiCreateButton(546,351,83,23,"1000$",false,GUIEditor_Window[1]) btn_buy_tec9 = guiCreateButton(709,350,70,23,"450$",false,GUIEditor_Window[1]) btn_buy_spaz12 = guiCreateButton(61,467,83,23,"650$",false,GUIEditor_Window[1]) btn_buy_sniper = guiCreateButton(200,464,83,23,"250$",false,GUIEditor_Window[1]) btn_buy_shotgun = guiCreateButton(361,461,83,23,"200$",false,GUIEditor_Window[1]) btn_buy_chainsaw = guiCreateButton(547,460,83,23,"400$",false,GUIEditor_Window[1]) btn_buy_satchel = guiCreateButton(708,460,83,23,"1800$",false,GUIEditor_Window[1]) function BuyWeapon(button, state) if (button == "left") then if(source == btn_buy_chainsaw) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_chainsaw") elseif(source == btn_buy_m4) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_m4") elseif(source == btn_buy_ak) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_ak") elseif(source == btn_buy_tec9) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_tec9") elseif(source == btn_buy_mp5) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_mp5") elseif(source == btn_buy_knife) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_knife") elseif(source == btn_buy_uzi) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_uzi") elseif(source == btn_buy_sniper) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_sniper") elseif(source == btn_buy_shotgun) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_shotgun") elseif(source == btn_buy_spaz12) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_spaz12") elseif(source == btn_buy_deserteagle) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_deserteagle") elseif(source == btn_buy_molotovcocktails) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_molotovcocktails") elseif(source == btn_buy_rifle) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_rifle") elseif(source == btn_buy_satchel) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_satchel") elseif(source == btn_buy_grenade) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_grenade") end end end addEventHandler("onClientGUIClick", root, BuyWeapon) bindKey("F2", "down", function() guiSetVisible(GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) guiSetInputEnabled(guiGetVisible(GUIEditor_Window[1])) end)
  6. <meta> <info name="Weapon Shop" author="Ninguem , Stanley Sathler" description="" version="2.0.1" type="script"></info> <script src="client.lua" type="client"></script> <file src="images/1.png" /> <file src="images/2.png" /> <file src="images/3.png" /> <file src="images/4.png" /> <file src="images/5.png" /> <file src="images/20.png" /> <file src="images/25.png" /> <file src="images/26.png" /> <file src="images/27.png" /> <file src="images/28.png" /> <file src="images/29.png" /> <file src="images/30.png" /> <file src="images/31.png" /> <file src="images/32.png" /> <file src="images/33.png" /> <file src="images/H.png" /> <file src="images/A.png" /> <file src="images/S.png" /> <file src="images/J.png" /> <file src="images/M.png" /> </meta> وش دخل الميتا اتوقع الخطأ في ربط سيرفر معه كلينت أنت مو حاط ملف السيرفر بالميتا "Weapon Shop" author="Ninguem , Stanley Sathler" description="" version="2.0.1" type="script">
  7. أستخدم الألمنت داتا مثال setElementData(player, "Class", "FBI")
  8. حط الميتا
  9. سحب سلاح واحد مع أمكانية تحديد عدد الطلقات الي تبي تسحبها https://wiki.multitheftauto.com/wiki/TakeWeapon أو سحب كل الأسلحة https://wiki.multitheftauto.com/wiki/TakeAllWeapons
  10. -- Client Side -- GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(119,119,815,504,"ShopWeapon By KING-ABADY {Saudi}~{Zombie}",false) guiWindowSetSizable(GUIEditor_Window[1],false) -- guiSetVisible(GUIEditor_Window[1],false) GUIEditor_Image[1] = guiCreateStaticImage(203,162,85,78,"images/1.png",false,GUIEditor_Window[1]) GUIEditor_Image[2] = guiCreateStaticImage(28,167,106,68,"images/2.png",false,GUIEditor_Window[1]) GUIEditor_Image[3] = guiCreateStaticImage(505,390,117,61,"images/3.png",false,GUIEditor_Window[1]) GUIEditor_Image[4] = guiCreateStaticImage(684,368,95,87,"images/4.png",false,GUIEditor_Window[1]) GUIEditor_Image[5] = guiCreateStaticImage(60,269,88,78,"images/5.png",false,GUIEditor_Window[1]) GUIEditor_Image[6] = guiCreateStaticImage(199,270,86,81,"images/20.png",false,GUIEditor_Window[1]) GUIEditor_Image[7] = guiCreateStaticImage(320,282,135,59,"images/25.png",false,GUIEditor_Window[1]) GUIEditor_Image[8] = guiCreateStaticImage(541,266,70,84,"images/26.png",false,GUIEditor_Window[1]) GUIEditor_Image[9] = guiCreateStaticImage(32,403,125,66,"images/28.png",false,GUIEditor_Window[1]) GUIEditor_Image[10] = guiCreateStaticImage(189,377,129,87,"images/29.png",false,GUIEditor_Window[1]) GUIEditor_Image[11] = guiCreateStaticImage(336,400,117,63,"images/27.png",false,GUIEditor_Window[1]) GUIEditor_Image[12] = guiCreateStaticImage(326,172,136,62,"images/30.png",false,GUIEditor_Window[1]) GUIEditor_Image[13] = guiCreateStaticImage(493,171,153,56,"images/31.png",false,GUIEditor_Window[1]) GUIEditor_Image[14] = guiCreateStaticImage(652,273,127,70,"images/32.png",false,GUIEditor_Window[1]) GUIEditor_Image[15] = guiCreateStaticImage(683,166,113,70,"images/33.png",false,GUIEditor_Window[1]) GUIEditor_Image[16] = guiCreateStaticImage(45,19,122,110,"images/H.png",false,GUIEditor_Window[1]) GUIEditor_Image[17] = guiCreateStaticImage(330,16,123,119,"images/A.png",false,GUIEditor_Window[1]) GUIEditor_Image[18] = guiCreateStaticImage(486,15,131,121,"images/J.png",false,GUIEditor_Window[1]) GUIEditor_Image[19] = guiCreateStaticImage(187,17,124,117,"images/M.png",false,GUIEditor_Window[1]) GUIEditor_Image[20] = guiCreateStaticImage(653,13,129,127,"images/S.png",false,GUIEditor_Window[1]) GUIEditor_Button[16] = guiCreateButton(63,125,82,27,"1000$",false,GUIEditor_Window[1]) GUIEditor_Button[17] = guiCreateButton(209,126,82,27,"2000$",false,GUIEditor_Window[1]) GUIEditor_Button[18] = guiCreateButton(355,125,82,27,"1500$",false,GUIEditor_Window[1]) GUIEditor_Button[19] = guiCreateButton(514,125,82,27,"2000$",false,GUIEditor_Window[1]) GUIEditor_Button[20] = guiCreateButton(677,125,82,27,"3000$",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(9,149,803,15,"___________________________________________________________________________________________________________________",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],0,0,255) GUIEditor_Label[2] = guiCreateLabel(9,258,803,15,"___________________________________________________________________________________________________________________",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],0,255,0) GUIEditor_Label[3] = guiCreateLabel(10,371,804,22,"___________________________________________________________________________________________________________________",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[3],255,0,0) btn_buy_deserteagle = guiCreateButton(61,240,83,23,"150$",false,GUIEditor_Window[1]) btn_buy_knife = guiCreateButton(200,239,83,23,"500$",false,GUIEditor_Window[1]) btn_buy_ak = guiCreateButton(359,239,83,23,"200$",false,GUIEditor_Window[1]) btn_buy_m4 = guiCreateButton(546,239,83,23,"250$",false,GUIEditor_Window[1]) btn_buy_mp5 = guiCreateButton(707,239,83,23,"150$",false,GUIEditor_Window[1]) btn_buy_grenade = guiCreateButton(58,352,83,23,"1500$",false,GUIEditor_Window[1]) btn_buy_uzi = guiCreateButton(200,352,83,23,"400$",false,GUIEditor_Window[1]) btn_buy_rifle = guiCreateButton(360,352,83,23,"100$",false,GUIEditor_Window[1]) btn_buy_molotovcocktails = guiCreateButton(546,351,83,23,"1000$",false,GUIEditor_Window[1]) btn_buy_tec9 = guiCreateButton(709,350,70,23,"450$",false,GUIEditor_Window[1]) btn_buy_spaz12 = guiCreateButton(61,467,83,23,"650$",false,GUIEditor_Window[1]) btn_buy_sniper = guiCreateButton(200,464,83,23,"250$",false,GUIEditor_Window[1]) btn_buy_shotgun = guiCreateButton(361,461,83,23,"200$",false,GUIEditor_Window[1]) btn_buy_chainsaw = guiCreateButton(547,460,83,23,"400$",false,GUIEditor_Window[1]) btn_buy_satchel = guiCreateButton(708,460,83,23,"1800$",false,GUIEditor_Window[1]) function BuyWeapon(button, state) if (button == "left") then if(source == btn_buy_chainsaw) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_chainsaw") elseif(source == btn_buy_m4) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_m4") elseif(source == btn_buy_ak) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_ak") elseif(source == btn_buy_tec9) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_tec9") elseif(source == btn_buy_mp5) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_mp5") elseif(source == btn_buy_knife) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_knife") elseif(source == btn_buy_uzi) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_uzi") elseif(source == btn_buy_sniper) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_sniper") elseif(source == btn_buy_shotgun) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_shotgun") elseif(source == btn_buy_spaz12) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_spaz12") elseif(source == btn_buy_deserteagle) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_deserteagle") elseif(source == btn_buy_molotovcocktails) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_molotovcocktails") elseif(source == btn_buy_rifle) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_rifle") elseif(source == btn_buy_satchel) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_satchel") elseif(source == btn_buy_grenade) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_grenade") end end end addEventHandler("onClientGUIClick", root, BuyWeapon) -- Server Side -- local price_chainsaw = "400" local price_m4 = "250" local price_ak = "200" local price_tec9 = "450" local price_mp5 = "150" local price_knife = "500" local price_uzi = "400" local price_sniper = "250" local price_shotgun = "200" local price_spaz12 = "650" local price_deserteagle = "150" local price_molotovcocktails= "1000" local price_rifle = "100" local price_satchel = "1800" local price_grenade = "1500" function BuyWeaponOnServer(weapon_name) local player_money = getPlayerMoney(source) local player_account = getPlayerAccount(source) if(getAccountData(player_account, "GunLicense") == true) then if(weapon_name == "weapon_chainsaw") then if(player_money >= tonumber(price_chainsaw)) then giveWeapon(source, 9) takePlayerMoney(source, tonumber(price_chainsaw)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_m4") then if(player_money >= tonumber(price_m4)) then giveWeapon(source, 31, 450) takePlayerMoney(source, tonumber(price_m4)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_ak") then if(player_money >= tonumber(price_ak)) then giveWeapon(source, 30, 450) takePlayerMoney(source, tonumber(price_ak)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_tec9") then if(player_money >= tonumber(price_tec9)) then giveWeapon(source, 32, 450) takePlayerMoney(source, tonumber(price_tec9)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_mp5") then if(player_money >= tonumber(price_mp5)) then giveWeapon(source, 29, 450) takePlayerMoney(source, tonumber(price_mp5)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_knife") then if(player_money >= tonumber(price_knife)) then giveWeapon(source, 4) takePlayerMoney(source, tonumber(price_knife)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_uzi") then if(player_money >= tonumber(price_uzi)) then giveWeapon(source, 28, 450) takePlayerMoney(source, tonumber(price_uzi)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_sniper") then if(player_money >= tonumber(price_sniper)) then giveWeapon(source, 34, 450) takePlayerMoney(source, tonumber(price_sniper)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_shotgun") then if(player_money >= tonumber(price_shotgun)) then giveWeapon(source, 25, 450) takePlayerMoney(source, tonumber(price_shotgun)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_spaz12") then if(player_money >= tonumber(price_spaz12)) then giveWeapon(source, 27, 450) takePlayerMoney(source, tonumber(price_spaz12)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_deserteagle") then if(player_money >= tonumber(price_deserteagle)) then giveWeapon(source, 24, 450) takePlayerMoney(source, tonumber(price_deserteagle)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_molotovcocktails") then if(player_money >= tonumber(price_molotovcocktails)) then giveWeapon(source, 18, 10) takePlayerMoney(source, tonumber(price_molotovcocktails)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_rifle") then if(player_money >= tonumber(price_rifle)) then giveWeapon(source, 33, 200) takePlayerMoney(source, tonumber(price_rifle)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_satchel") then if(player_money >= tonumber(price_satchel)) then giveWeapon(source, 39, 10) takePlayerMoney(source, tonumber(price_satchel)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end elseif(weapon_name == "weapon_grenade") then if(player_money >= tonumber(price_grenade)) then giveWeapon(source, 16, 10) takePlayerMoney(source, tonumber(price_grenade)) outputChatBox("لقد اشتريت السلاح.", source, 0, 255, 0) else outputChatBox("لاتملك المال الكافي للشراء.", source, 255, 0, 0) end end end end addEvent("onClientBuyWeapon", true) addEventHandler("onClientBuyWeapon", root, BuyWeaponOnServer)
  11. if you make it zip and still not working, mostly you have a folder inside the zip file. if you still can't get it work, upload your resource at http://www.mediafire.com i'll take a look.
  12. As far as i know rar not working in MTA, you have to make it zip or folder.
  13. The example in wiki explained it. https://wiki.multitheftauto.com/wiki/OnClientGUIComboBoxAccepted just change this if ( text ~= "" ) then to if ( text == "Model 1" ) then
  14. LabelName = guiCreateLabel(3,210,300,70,"Your Name:",false,WindowName) function refresh() if guiGetVisible(WindowName) then guiSetText(LabelName,"Your Name: "..getPlayerName(localPlayer)) end end addEventHandler("onClientRender", root, refresh)
  15. vehicle = {} local TableMarker = { {x = 1556.6724853516, y = -1606.4342041016, z = 12.3}, {x = 1544.0750732422, y = -1609.6583241953, z = 12.3} } addEventHandler("onResourceStart", resourceRoot, function() for _, m in ipairs (TableMarker) do local marker = createMarker(m.x, m.y, m.z) addEventHandler("onMarkerHit", marker, onHit) end end) function onHit(player) if getElementType(player) == "player" and not isPedInVehicle(player) then if isElement(vehicle[player]) then destroyElement(vehicle[player]) end local x, y, z = getElementPosition(player, x, y, z) vehicle[player] = createVehicle(596, x, y, z) warpPedIntoVehicle(player, vehicle[player]) end end
  16. TAPL

    [REL] VIP System

    what the are you talking about? The VIP Gui is (Admin Panel) > open it > give yourself Armor > give yourself Vehicle > give yourself $ (set Money?) > give yourself Jetpack. This is what he think about VIP <=== (LoL).
  17. لا
  18. TAPL

    [REL] VIP System

    What do ACL have to do with such thing?
  19. https://community.multitheftauto.com/ind ... ls&id=5802 Original https://community.multitheftauto.com/ind ... ls&id=5794 DONE
  20. مو بس الميتا كمان الكود غير الافنت و ضبط الأرجمنت
  21. الحل سو الكود سيرفر
  22. Note: Vehicles (and other elements) created client-side are only seen by the client that created them, aren't synced and players cannot enter them. They are essentially for display only. https://wiki.multitheftauto.com/wiki/CreateVehicle
  23. TAPL

    مساعده

    ذا الكود مخبوص و مبرمج بطريقة خاطئة وفيه أخطاء و المشكلة الكل ينسخه و يحطه بشوبه الي كله أكواد كوبي بست إذا تبون كوبي بست خلكم على عماكم بس كذا ما بيشتغل الصوت عند الكل
  24. if car then destroyElement(car) local x,y,z = getElementPosition( getLocalPlayer()) car = createVehicel(522,x,y,z) else local x,y,z = getElementPosition( getLocalPlayer()) car = createVehicel(522,x,y,z) هذا حطه لما يدخل الماركر lol?
  25. How about stop spamming the forum?
×
×
  • Create New...