Jump to content

ALw7sH

Members
  • Posts

    1,165
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by ALw7sH

  1. تريقر لسيرفر سايد وتتحقق لو انه اللاعب عنده الرتبة ذي ولو عنده تريقر لكلاينت سايد عشان يفك اللوحة triggerServerEvent -- isObjectInACLGroup triggerClientEvent
  2. لازم تستبدل بلاير بـ سورس لانك انت محدد السورس هو اللاعب
  3. ALw7sH

    طلب

    تقدر تسويها اكونت داتا وتقدر سكل لايت وتقدر مايسكل اذا سيرفرك يلزم اللاعب يسجل اول مايدخل مو لازم تسويها سكل لاينت او مايسكل تقدر بس تسويها اكونت داتا اسهل لك onPlayerWasted استخدم ايفنت عشان تجيب القاتل والي المفروض يزيد لفله او قتلاته انت طبعاً مو لازم تسوي داتا للفل تسوي للقتلات بس وتجيب عدد القتلات الي عنده وتزيد عليها واحد false وعشان ماتواجهك مشاكل تحقق انه عنده قتلات لانه احتمال تكون داتا القتلات ف تستبدلها ب 0 kills = getAccountData(...,"kills") or 0 setAccountData(...,"kills",kills+1) واذا تبي تجيب لفل اللاعب عندك اكثر من طريقة تقدر مثلاً تسوي جدول Levels = { --[Level] = Kills [1] = 50, [2] = 100, }
  4. ضيف المتغيرات الي رسلتهم معى التريقر من كلاينت سايد الى الفنكشن حق التريقر في السيرفر سايد ( function (name, age) ) ومو لازم تضيفهم بنفس الاسم الي ارسلتهم فيه بس اهم شي نفس الترتيب
  5. local TIME_TO_BLOCK = 5 -- in seconds local LAST_MESSAGE = {} function chatbox(text) cancelEvent() if not LAST_MESSAGE[source] or LAST_MESSAGE[source] >= (TIME_TO_BLOCK*1000) then LAST_MESSAGE[source] = getTickCount() else return end outputChatBox("Don't spam, You will be able to send message in "..(math.floor(LAST_MESSAGE[source]*1000)).." seconds !.",source,255,0,0,true) end if string.find(text, "**" ) or string.find(text, "**" ) or string.find(text, "*" ) or string.find(text, "**" ) or string.find(text, "**" ) or string.find(text, "*/*" ) then outputChatBox("#ffffff[ #ff1111Chat System#ffffff ] #ffcc00 message Is Blocked | #cccccc تـَم حـَظر الرسالة #ffff11[F.H]", source, 255, 0, 0, true) return end local account = getAccountName(getPlayerAccount(source)) local name = getPlayerName(source) if isObjectInACLGroup("user."..account, aclGetGroup("Console")) then outputChatBox("#D11919* #000000[#ff0000 Console#000000 ] "..name..":#ffcc00 "..text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user."..account, aclGetGroup("Admin")) then outputChatBox("#D11919* #000000[#D80000 Head Admin #000000] #FFFFFF#ff0000"..name..":#E8A317 "..text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user."..account, aclGetGroup("VIP")) then outputChatBox(" #000000[#ffffff+#ff9900Rent#000000 ]#ff9900 "..name..":#33CCFF "..text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user."..account, aclGetGroup("Police")) then outputChatBox("#000000* #ffffff[ #0099FFPolice #ffffff]#0099FF "..name..":#FFFFFF "..text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user."..account, aclGetGroup("Everyone")) then outputChatBox("#ffffff"..name..":#ffffff "..text, root, 255, 255, 255, true) end end addEventHandler("onPlayerChat", root, chatbox) addEventHandler("onPlayerQuit",root, function() if LAST_MESSAGE[source] then LAST_MESSAGE[source] = nil end end )
  6. ALw7sH

    Help GUI!

    As i told you and WhoAmI told you, you have to use spawnPlayer function
  7. Can you post your drift points script?
  8. الكود مافيه أي خطأ المشكله من سكربت من عندك لو عندك سكربت تاج او شي زي كذا
  9. ALw7sH

    killZombie

    onPlayerDamage Called only when player dmaged You have to use onClientPedDamage instead
  10. ALw7sH

    Help GUI!

    Are you using spawnPlayer function in your spawn codes?
  11. How you can be sure that the event triggred if there's no errors or anything outputted put outputDebugString at the first line of the "createBusiness" function to be sure that it's beeing triggred mysql = dbConnect( "mysql", "dbname=thedb;host=localhost", "root", "", "share=1" ) function createBusiness(getBusName) outputDebugString("onBusinessCreate Has been triggred !") local insert = dbExec( mysql, "INSERT INTO business ( name ) VALUES ( ? )", getBusName ) if (insert) then outputChatBox("Congratulations, you have created your business", source, 255, 194, 14) else outputDebugString("MySQL Error: Unable to create business!") end end addEvent("onBusinessCreate", true) addEventHandler("onBusinessCreate", getRootElement(), createBusiness)
  12. كل 5 ثواني بيفضي الجدول والكل بيقدر يتكلم حتى الي تو متكلم يعني مثال انا تكلمت والتايمر حقك باقيله ثانيه وحده بعد ثانيه بقدر اتكلم مره ثانيه والمفروض اني اقدر اتكلم بعد 5 ثواني (chatSpam[source] = setTimer(...)) التايمر المفروض يكون داخل الايفنت اول مايتكلم اللاعب وتخلي التايمر على فنكشن فاضي وتدخل التايمر في جدول باللاعب وتتحقق اذا تكلم التايمر موجود او لا لو موجود تسوي كنسل أيفنت ---- local TIME_TO_BLOCK = 5 -- in seconds local LAST_MESSAGE = {} function Chat() if not LAST_MESSAGE[source] or LAST_MESSAGE[source] >= (TIME_TO_BLOCK*1000) then LAST_MESSAGE[source] = getTickCount() else cancelEvent() outputChatBox("Don't spam, You will be able to send message in "..(math.floor(LAST_MESSAGE[source]*1000)).." seconds !.",source,255,0,0,true) end end addEventHandler("onPlayerChat", root, Chat) addEventHandler("onPlayerQuit",root, function() if LAST_MESSAGE[source] then LAST_MESSAGE[source] = nil end end )
  13. mysql = dbConnect( "mysql", "dbname=thedb;host=localhost", "root", "", "share=1" ) function createBusiness(getBusName) local insert = dbExec( mysql, "INSERT INTO business ( name ) VALUES ( ? )", getBusName ) if (insert) then outputChatBox("Congratulations, you have created your business", source, 255, 194, 14) else outputDebugString("MySQL Error: Unable to create business!") end end addEvent("onBusinessCreate", true) addEventHandler("onBusinessCreate", getRootElement(), createBusiness) be sure that the sql is connected
  14. if getDistanceBetweenPoints3D(ox,oy,oz,px,py,pz) <= distance then local gateX, gateY, gateZ, rotX, roxY, rotZ = getElementAttachedOffsets(gate) setElementAttachedOffsets(gate, gateX, gateY+2, gateZ+2, rotX, -90, rotZ) --moveObject(gate, 2000, gateX+4.9, gateY+9.6, gateZ, 0, 0, 0) -- moveObject(gate1, 17951, gateX, gateY, gateZ+3, -90, 0, 0) outputChatBox("You have opened your garage!", thePlayer, 0, 255, 0) found = true break else outputChatBox("You are too far away from the garage!", thePlayer, 255, 0, 0) end
  15. تبي الفنكشنات والطريقة وبتحاول او تبي نسويلك كل شي جاهز وانت بس تركب؟ لو تبي نسويلك كل شي جاهز ماعتقد انك في القسم الصحيح
  16. if it's local yea it will reset but if it's not local not it wont reset but if you used the function more than one time like that addEventHandler("onClientRender",root, function() dxDrawProgressBar(...) dxDrawProgressBar(...) dxDrawProgressBar(...) end ) all the progressbars well have the last progressbar created positions
  17. local easing = "OutBounce" local time = 2000 local open = false local distance = 50 function openGarageGate(thePlayer, cmd, garageID) if not garageID then outputChatBox("SYNTAXA: /"..cmd.." [iD Garage]", thePlayer, 255, 255, 0) else local garageID = tonumber(garageID) local found = false for i, v in ipairs (getElementsByType("object")) do if (getElementModel(v) == 17950) then local gate = getElementData(v, "poarta") local dbid = tonumber(getElementData(v, "dbid")) if (dbid == garageID) then local px,py,pz = getElementPosition(thePlayer) local ox,oy,oz = getElementPosition(v) if getDistanceBetweenPoints3D(ox,oy,oz,px,py,pz) <= distance then local gateX, gateY, gateZ = getElementPosition(gate) --moveObject(gate, time, gateX+4.9, gateY+9.6, gateZ, 0, 0, 0, easing) moveObject(gate, 17951, 1588.5490234375, -1637.95546875, 16.446516990662, -90, 0, 0) outputChatBox("You have opened your garage!", thePlayer, 0, 255, 0) found = true break else outputChatBox("You are too far away from the garage!", thePlayer, 255, 0, 0) end end end end if found == false then outputChatBox("There's no garage with this ID!", thePlayer, 255, 0, 0) end end end addCommandHandler("opengarage", openGarageGate)
  18. local easing = "OutBounce" local time = 2000 local open = false local distance = 50 function openGarageGate(thePlayer, cmd, garageID) if not garageID then outputChatBox("SYNTAXA: /"..cmd.." [iD Garage]", thePlayer, 255, 255, 0) else local garageID = tonumber(garageID) local found = false for i, v in ipairs (getElementsByType("object")) do if (getElementModel(v) == 17950) then local gate = getElementData(v, "poarta") local dbid = tonumber(getElementData(v, "dbid")) if (dbid == garageID) then if getDistanceBetweenPoints3D(getElementPosition(v),getElementPosition(thePlayer)) <= distance then local gateX, gateY, gateZ = getElementPosition(gate) --moveObject(gate, time, gateX+4.9, gateY+9.6, gateZ, 0, 0, 0, easing) moveObject(gate, 17951, 1588.5490234375, -1637.95546875, 16.446516990662, -90, 0, 0) outputChatBox("You have opened your garage!", thePlayer, 0, 255, 0) found = true break else outputChatBox("You are too far away from the garage!", thePlayer, 255, 0, 0) end end end end if found == false then outputChatBox("There's no garage with this ID!", thePlayer, 255, 0, 0) end end end addCommandHandler("opengarage", openGarageGate)
×
×
  • Create New...