Jump to content

TAPL

Retired Staff
  • Posts

    7,337
  • Joined

  • Days Won

    11

Everything posted by TAPL

  1. You need to use this to change the text color in the button. guiSetProperty
  2. it's looks you don't have table with name Account.
  3. How about show the rest code?
  4. i know nothing about global resource and giveMoney function, moreover client may not define.
  5. This will give you random number in range 500-600 exports.global:giveMoney(client, math.random(500,600)) and please next time use lua button not Code.
  6. math.random
  7. تعرف الفرق بين هذا وهذا ما يمديك تلبسهم واحد برجل اليمين و الثاني برجل اليسار هذا الفرق بين الكودين الي أنت حاطهم هههههه
  8. الكود الأول مو متصل بالكود الثاني لانك ناسخ مثال الويكي يعطيك نفاثة /jetpack المثال هذا إذا كتبت
  9. يب صح
  10. جرب الكود و رد لي خبر
  11. مافيه أي مشكلة بالكود
  12. addEvent("1", true) addEventHandler("1", root, function() if isPedInVehicle(source) then if (getPlayerMoney (source) >= 1000) then takePlayerMoney(source, 1000) addVehicleUpgrade(getPedOccupiedVehicle(source),1074) outputChatBox("~| تـم تركيب آلجنـط بنجـآح |~", source, 255, 255, 0, true) account = getPlayerAccount(source) if (account) and not (isGuestAccount(account)) then setAccountData(account,"theWheel",1074) end else outputChatBox("Not enough money.", source, 255, 0, 0, true) end else outputChatBox("~| خطأ : يجب ان تكون رآكب سيارة |~", source, 255, 0, 0, true) end end) addEventHandler("onPlayerVehicleEnter", root, function(veh,seat) account = getPlayerAccount(source) if seat == 0 and (account) and not (isGuestAccount(account)) then addVehicleUpgrade(veh,getAccountData(account,"theWheel")) end end)
  13. TAPL

    Help Me

    give مثلاً توزيع 5000 بعد ساعة و 30 دقيقة و 30 ثانية give 5000 1 30 30 أو توزيع 5000 بعد ساعة و 30 دقيقة give 5000 1 30 أو توزيع 5000 بعد ساعة give 5000 1 أو (توزيع 5000 بعد نص ساعة (30 دقيقة give 5000 0 30 أو توزيع 5000 بعد 10 دقائق give 5000 0 10
  14. TAPL

    Help Me

    addCommandHandler("give", function (player,cmd,amount,hours,min,sec) hours = tonumber(hours) or 0; min = tonumber(min) or 0 ; sec = tonumber(sec) or 0 outputChatBox("Money for all after: "..hours.." Hours and "..min.." Min and "..sec.." Sec.",root,255,255,0) if isTimer(MoneyTime) then killTimer(MoneyTime) end MoneyTime = setTimer(function() givePlayerMoney(root, tonumber(amount)) end, hours*3600000 + min*60000 + sec*1000, 1) end)
  15. The source of this event is the vehicle that exploded. https://wiki.multitheftauto.com/wiki/OnVehicleExplode
  16. You're welcome.
  17. TAPL

    Spawn

    You're welcome.
  18. -- Client Side wdwLogin = guiCreateWindow(0.375, 0.375, 0.70, 0.70, "Vitaj", true) guiCreateLabel(0.0825, 0.1, 0.25, 0.25, "Meno", true, wdwLogin) guiCreateLabel(0.0825, 0.2, 0.25, 0.25, "Heslo", true, wdwLogin) guiCreateLabel(0.0825, 0.6, 0.25, 0.25, "Info", true, wdwLogin) wdwRegister = guiCreateWindow(0.375, 0.375, 0.40, 0.40, "Registracia", true) guiCreateLabel(0.0825, 0.2, 0.25, 0.25, "Meno", true, wdwRegister) guiCreateLabel(0.0825, 0.4, 0.25, 0.25, "Heslo", true, wdwRegister) guiSetProperty(wdwRegister, "AlwaysOnTop", "true") edtUser = guiCreateEdit(0.160, 0.1, 0.3, 0.06, "", true, wdwLogin) edtPass = guiCreateEdit(0.160, 0.2, 0.3, 0.06, "", true, wdwLogin) guiCreateMemo( 118, 200, 850, 280, "", false, wdwLogin ) guiEditSetMaxLength(edtUser, 50) guiEditSetMaxLength(edtPass, 50) edtUserS = guiCreateEdit(0.160, 0.2, 0.4, 0.06, "", true, wdwRegister) edtPassS = guiCreateEdit(0.160, 0.4, 0.5, 0.06, "", true, wdwRegister) guiEditSetMaxLength(edtUserS, 50) guiEditSetMaxLength(edtPassS, 50) guiEditSetMasked ( edtPassS, true ) guiEditSetMasked ( edtPass, true ) btnLogin = guiCreateButton(0.500, 0.1, 0.25, 0.2, "Prihlasit", true, wdwLogin) btnRegister = guiCreateButton(0.750, 0.1, 0.25, 0.2, "Registracia", true, wdwLogin) btnRegisterS = guiCreateButton(0.750, 0.1, 0.25, 0.2, "Registrovat", true, wdwRegister) guiSetVisible(wdwRegister,false) showCursor(true) guiSetInputEnabled(true) addEventHandler('onClientGUIClick',root, function() if source == btnLogin then local user = guiGetText(edtUser) local pass = guiGetText(edtPass) if user ~= "" and pass ~= "" then triggerServerEvent('submitLogin',localPlayer,user,pass) else outputChatBox("Prosim napis svoje meno a heslo.") end elseif source == btnRegisterS then local user = guiGetText(edtUserS) local pass = guiGetText(edtPassS) triggerServerEvent('submitRegister',localPlayer,user,pass) end end ) addEvent("HideGui",true) addEventHandler("HideGui",root, function() guiSetInputEnabled(false) showCursor(false) guiSetVisible(wdwLogin,false) guiSetVisible(wdwRegister,false) end) addEventHandler('onClientGUIClick', root, function() if source == btnRegister then guiSetVisible(wdwRegister,true) end end) -- Server Side -- addEvent( "submitLogin", true) addEvent("submitRegister", true) function loginHandler(username,password) local account = getAccount (username, password) if account then logIn(source, account, password) triggerClientEvent(source,"HideGui",source) else outputChatBox("Zle zadane Meno alebo Heslo, skus znova prosim.",source) end end addEventHandler("submitLogin",root,loginHandler) function registerHandler(username, password) local account = getAccount(username) if (account) then outputChatBox("Account with this name already exists!", source, 255, 255, 255) return end account = addAccount(username, password) if (logIn(source, account, password) == true) then triggerClientEvent(source, "HideGui", source) end end addEventHandler("submitRegister", root, registerHandler)
  19. TAPL

    Spawn

    i think you need to use a timer with event onPlayerJoin for spawnPlayer.
  20. غير ذا function jet() إلى function jet(source)
  21. المشكلة = ؟؟
  22. TAPL

    Spawn

    lol, change player in all your code to source.
  23. Show client side.
  24. TAPL

    Spawn

    change this spawnPlayer(player, 213.81648254395, 1870.0822753906, 13.140625, 0 , 285) to spawnPlayer(player, 213.81648254395, 1870.0822753906, 13.140625, 0 , getElementModel(player))
  25. TAPL

    Spawn

    Use this to get the old skin: getElementModel Use this to prevent spawn in same place: math.random Make a script to save the weapon and retrieve it when you need.
×
×
  • Create New...