Jump to content

ALw7sH

Members
  • Posts

    1,165
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by ALw7sH

  1. مافيه خطأ في الكود, تأكد انك مخليه سيرفر سايد
  2. untill = ? until* until تستخدم معى repeat local i = 0 repeat i = i +1 until i == 5
  3. You have to load the txd first then the dff
  4. It still goes to the triggerServerEvent when 1 or more fields are empty, which should be triggered when all the fields have some text it them... Try that for k,v in ipairs(edits) do if #guiGetText(v) == 0 then outputChatBox("Please enter all the details needed.", 255, 0, 0) break end end break gonna stop the loop only
  5. It shouldn't, are you sure they are empty? make sure there's no even spaces and make sure all your edits are in the table with the right varb names
  6. local edits = {mName,mAge,mPhone,mAddress,mQuestion,mEducation,mBio,mHoursPlayed,mOOCAge,mFaction,mRPLvl} function sendCVData(button, state) if (source==bSend) and (button=="left") and (state=="up") then for k,v in ipairs(edits) do if #guiGetText(v) == 0 then outputChatBox("Please enter all the details needed.", 255, 0, 0) return false end end if not tonumber(guiGetText(mPhone)) then outputChatBox("The phone number doesn't seem to be valid.", 255, 0, 0) elseif not tonumber(guiGetText(mOOCAge)) or not tonumber(guiGetText(mAge)) then outputChatBox("Your age doesn't seem to be valid", 255, 0, 0) else outputChatBox(guiGetText(mAge)) local name = guiGetText(mName) triggerServerEvent("saveCVData", resourceRoot, getLocalPlayer(), name, guiGetText(mAge), guiGetText(mPhone), guiGetText(mAddress), guiGetText(mQuestion), guiGetText(mEducation), guiGetText(mBio), guiGetText(mHoursPlayed), guiGetText(mOOCAge), guiGetText(mFaction), guiGetText(mRPLvl), cvPedName, factionName) -- destroyElement(formWindow) -- formWindow = nil -- showCursor(false) -- guiSetInputEnabled(false) end end end
  7. That's false ~= means not equal to Yes it wasn't gonna work like what it supposed to but not as you said change it to if (not getPlayerTeam(aimPlayer)) or (getPlayerTeam(aimPlayer) and getTeamName(getPlayerTeam(aimPlayer)) ~= "#000000Psycho Ma#990000ns Gang") then
  8. ALw7sH

    Solved

    Who's "source" or "sorce" and setElementData(sorce, "all", r,g,b) should be setElementData(sorce, "all", {r,g,b})
  9. فيه اكثر من طريقه اذا كانت العلامه خاصه بلاعب تقدر تحطها له المنت داتا او اذا كانت خاصه بالسكربت كله تقدر تخليها المنت داتا للسكربت
  10. يقدر يسويها بدون جداول بالنسبه لسحب السياره يقدر يخلي السياره المنت داتا للاعب واذا يبي يسحبها يجيب الالمنت داتا من اللاعب
  11. Change line 38 to if getPlayerTeam(aimPlayer) and getTeamName(getPlayerTeam(aimPlayer)) ~= "#000000Psycho Ma#990000ns Gang" then
  12. ALw7sH

    Solved

    They did gave you not one example but two and you're still giving us some weird errors?
  13. Yes you can return in elseif
  14. ALw7sH

    Solved

    Yes it is added. Where's your full code? we cant help you without your code
  15. ALw7sH

    Solved

    He don't need to set/get-Elementdata does store tables unlike set/get-accountData ViRuZGamiing example is what he should do, btw there's a missing ")" on line 8
  16. ALw7sH

    Solved

    It's for tables not string
  17. ALw7sH

    Solved

    addEventHandler("onClientPlayerChangeNick", getRootElement(), function(oldNick, newNick) outputChatBox(""..oldNick.." --> "..newNick.."", 255, 100, 100, true) local logFile = fileOpen("logs/logs.log") or fileCreate("logs/logs.log") if logFile then local size = fileGetSize(logFile) fileSetPos(logFile, size) fileWrite(logFile, ""..oldNick.." --> "..newNick.."") fileClose(logFile) end end) This is your code plus "or fileCreate" and it's working perfectly but maybe you're checking the resource file you'll find the file in "C:\Program Files (x86)\MTA San Andreas 1.5\mods\deathmatch\resources\RESOURCENAME\logs"
  18. Use onClientCharacter instead of onClientKey if you want to do custom edit
  19. shap1 = createColRectangle ( -1642, -2400, 405, 351) addEventHandler ('onClientPlayerDamage',root, function(attacker) if isElementWithinColShape (source,shap1) then cancelEvent () end end)
  20. اسم الايفنت لازم يكون سترنق "onPlayerLogin"
  21. ALw7sH

    Job

    elseif ( name == 'Police' ) then create3DText ( 'Police', { x, y, z }, { 0, 100, 255 }, { nil, true } ) local p = createElement ( "GodmodePed" ) setElementData ( p, "Model", 286 ) setElementData ( p, "Position", { x, y, z, rz } ) createBlip ( x, y, z, 61, 2, 255, 255, 255, 255, 0, 450 ) addEventHandler ( 'onMarkerHit', createMarker ( x, y, z - 1, 'cylinder', 2, 0, 0, 0, 0 ), function ( p ) if ( getElementType ( p ) == 'player' and not isPedInVehicle ( p ) and not isPedDead ( p ) ) then if ( getPlayerWantedLevel ( p ) > max_wanted.law ) then return exports['SAEGMessages']:sendClientMessage ( "The max wanted level for this job is "..tostring ( max_wanted.law )..".", p, 255, 0, 0 ) end if ( getElementData(p, "Group") ~= "None" ) then return exports.SAEGMessages:sendClientMessage ("You Can't take this job while you are in the Gang.",p, 255, 7, 7 ) end triggerClientEvent ( p, 'SAEGJobs:OpenJobMenu', p, 'police' ) end end )
  22. في الكود حقك تحقق اذا كان الستاتس اونلاين e.g local admins = getAdminsByGroup("Admins") outputChatBox("Online admins:") for k,v in ipairs(admins) do if v["Online"] == "Online" then outputChatBox(v["Name"]) end end
  23. https://forum.multitheftauto.com/viewforum.php?f=148
×
×
  • Create New...