-
Posts
1,165 -
Joined
-
Last visited
-
Days Won
3
Everything posted by ALw7sH
-
Hello, well, today i'll present you my new script voteredo for race idont know if there's any bugs because i dont have much time to test it as will but if you found any bug report it idont have anything more to say it about this script but yeah ithink most of you know what it is Download
-
السلام عليكم ورحمة الله السكربت معروف مايحتاج أشرح عنه شي أذا لقيت بق قولي عنه لانه السكربت سويته سريع وماعندي وقت اجربه تمام Download ^ السكربت ماهو مشفر
-
الايفنت يستخدم onPlayerSpawn افضل لأنه مو لازم يرسبن اللاعب اول مايخش السيرفر + لو مات ورسبن ثاني اعتقد بتكون مشكله بس مو متأكد
-
ذولي : local Count = getPlayerCount ( )/ 2 local mapName = getMapName() local CountCommand = 0 local i = CountCommand + 0+0 لازم يتحدثون كل ماب edit : عشان انه يعيد الماب على طول انت مخلي لو وصل الفوت للي تبيه ع طول يعيد الماب خل اكواد اعادة الماب معى ايفنت مثلاً onRaceStateChanging or onPlayerRaceWasted
-
طلبك الاول : getElementData -- تجيب داتا الساعات حق اللاعب split -- تستخدم ذا الفنكشن عشان تجيب الساعات فقط لو تبي ولو تبي تجيب الوقت كامل لاتستخدمه يعني لو تبي الساعات والدقايق خله طلبك الثاني : getElementPosition -- تجيب احداثيات اللاعب getScreenFromWorldPosition -- ما اعرف كيف اشرح لك الفنكشن لاكن استخدم الفنكشن ذا معى احداثيات اللاعب dxDrawText طلبك الثالث : Client: guiGetText triggerServerEvent -- تسوي تريقر بالكتابه الي بالتكست Server: setElementData -- تحطها له داتا Event: onPlayerChat - canelEvent plrTag = getElementData(source,'tag') or "" outputChatBox(plrTag..''..getPlayerName(source)..' :' ...etc...)) ^ اذا تكلم اللاعب كنسل الايفنت واصنع مخرج شات جديد بالبدايه جيب الداتا الي فيها تاق اللاعب وبعدها الاسم وكتابته
-
https://wiki.multitheftauto.com/wiki/Sc ... troduction -- English https://wiki.multitheftauto.com/index.ph ... 8%AC%D9%87 -- Arabic
-
اشوف مافيه فايده انك تعطيه الفنكشنات بدون ماتفهمه وش لازم يسوي وثاني شي انت خالط له ام الفنكشنات خلط كلنت على سيرفر كلهم معى بعض ماتوقع معى مستواه ذا بيفهم شي من ردك لول
-
local Marjerkhashwood = { { -1635.6999511719, -2219.5, 30 }, { -1636.8000488281, -2203.6000976563, 30.400001525879 }, { -1731.3000488281, -2212, 55 }, { -1715.8000488281, -2235.6999511719, 46 }, { -1643.0999755859, -2261.8000488281, 31.599998474121 } }
-
for me i use it like that : local prog = 0 addEventHandler('onClientRender',root, function() prog = math.min(prog+0.02,1) cX,cY,cX = interpolateBetween(0, 0, 0, 0, 10, 0,prog,"Linear") dxDrawRectangle(100,cY,100,100) end ) there's other way but this is better for me
-
ithink u didn't contect it with database #4 KryPtoHolYx Because we think that mysql is a good save system, and why not ? to the 2 errors/warnings they are because you haven´t connected the script to the mysql server ( maybe use xampp ) Maps, i´ll upload some. Regards
-
local killsToLvlUp = nil function levelUp(_,killer) local plrLvl = tonumber(getElementData(killer,'Level')) or 1 local kills = tonumber(getElementData(killer,'Kills')) or 0 setElementData(killer,'Kills',kills+1) if killsToLvlUp >= kills then -- if player level more than level*2 then level up setElementData(killer,'Level',plrLvl+1) triggerEvent('onPlayerLeavelUp',killer,plrLvl,kills) end end addEventHandler ( "onPlayerWasted", getRootElement(), levelUp ) addEvent('onPlayerLeavelUp',true) addEventHandler('onPlayerLeavelUp',root, function(lvl) killsToLvlUp = lvl*2 end ) addEvent('onPlayerJoin',true) addEventHandler('onPlayerJoin',root, function() local lvl = tonumber(getElementData(source,'Level')) if lvl then killsToLvlUp = lvl*2 else killsToLvlUp = 1 end end ) addEvent('onResourceStart',true) addEventHandler('onResourceStart',root, function() for k,v in ipairs(getElementsByType("player")) do local lvl = tonumber(getElementData(v,'Level')) if lvl then killsToLvlUp = lvl*2 else killsToLvlUp = 1 end end end )
-
WHAT THE FUCK وش دخل bodypart بالسلاح
-
تأكد من احداثياتك وتأكد انك تشغل السكربت ويشتغل
-
سو تحقق بالحدث اذا قطع المحرك موجوده عشان مايجي الخطأ مثال على قصدي addEventHandler('onClientPreRender',root function() if exmaple then end end ) + اهم شي تكون اسم القطعه معرفه
-
أنا كما قلت السكريبت تجريبي ، و يا ريت توضح المشكله عشان أشوفها ، إذا المشكله بال دبوق فهذا إشي طبيعي شكرا لك اذا الخطأ الي بالديبق WARNING or ERROR مافيه شي اسمه طبيعي بيكون اكيد ناقصك تحققات في اشياء -- افكارك حلوه واصل
-
oh sorry i forget to change the name of first argument function chatbox(text, msgtype) local root = getRootElement() local account = getAccountName(getPlayerAccount(source)) local name = getPlayerName(source) if (msgtype == 0) then if pregFind(text, "([0-9]{1,3})[^[:digit:]^[:cntrl:]]{1,3}([0-9]{1,3})[^[:digit:]^[:cntrl:]]{1,3}([0-9]{1,3})[^[:digit:]^[:cntrl:]]{1,3}([0-9]{1,3})") then cancelEvent(true) outputChatBox("Reklama!", source, 255, 0, 0, true) return end if isObjectInACLGroup("user." .. account, aclGetGroup("Console")) then cancelEvent(true) outputChatBox("#FF0000[#FF0000Хозяин#FF0000] #FFFFFF" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: #FF0000[#FF0000Хозяин#FF0000] #FFFFFF" .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then cancelEvent(true) outputChatBox("#0000FF[#0000FFАдмин#0000FF] #FFFFFF" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: #0000FF[#0000FFАдмин#0000FF] #FFFFFF" .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("SuperModerator")) then cancelEvent(true) outputChatBox(" #00FF00[#00FF00Гл.#00FF00Админ#00FF00] #FFFFFF" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: #00FF00[#00FF00Гл.#00FF00Админ#00FF00] #FFFFFF" .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then cancelEvent(true) outputChatBox(name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: #FFFFFF" .. name .. ": " .. text) end elseif (msgtype == 2) then end end addEventHandler("onPlayerChat", root, chatbox) function RGBToHex(red, green, blue, alpha) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then return nil end if(alpha) then return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha) else return string.format("#%.2X%.2X%.2X", red,green,blue) end end
-
function chatbox(text, msgtype) local root = getRootElement() local account = getAccountName(getPlayerAccount(source)) local name = getPlayerName(source) if (msgtype == 0) then if pregFind(message, "([0-9]{1,3})[^[:digit:]^[:cntrl:]]{1,3}([0-9]{1,3})[^[:digit:]^[:cntrl:]]{1,3}([0-9]{1,3})[^[:digit:]^[:cntrl:]]{1,3}([0-9]{1,3})") then cancelEvent(true) outputChatBox("Reklama!", source, 255, 0, 0, true) return end if isObjectInACLGroup("user." .. account, aclGetGroup("Console")) then cancelEvent(true) outputChatBox("#FF0000[#FF0000Хозяин#FF0000] #FFFFFF" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: #FF0000[#FF0000Хозяин#FF0000] #FFFFFF" .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then cancelEvent(true) outputChatBox("#0000FF[#0000FFАдмин#0000FF] #FFFFFF" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: #0000FF[#0000FFАдмин#0000FF] #FFFFFF" .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("SuperModerator")) then cancelEvent(true) outputChatBox(" #00FF00[#00FF00Гл.#00FF00Админ#00FF00] #FFFFFF" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: #00FF00[#00FF00Гл.#00FF00Админ#00FF00] #FFFFFF" .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then cancelEvent(true) outputChatBox(name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: #FFFFFF" .. name .. ": " .. text) end elseif (msgtype == 2) then end end addEventHandler("onPlayerChat", root, chatbox) function RGBToHex(red, green, blue, alpha) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then return nil end if(alpha) then return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha) else return string.format("#%.2X%.2X%.2X", red,green,blue) end end
-
where did u put this code? u have to put it in your race gamemode race\modes\destructionderby.lua
-
addCommandHandler('setaccelaration', function(plr,cmd,accelaration) if isPedInVehicle(plr) and getPedOccupiedVehicleSeat(plr) == 0 then if tonumber(accelaration) >= 0 and tonumber(accelaration) <= 100000 then vehicle = getPedOccupiedVehicle(plr) setVehicleHandling(vehicle,'engineAcceleration',tonumber(accelaration)) else outputChatBox('ERROR',plr,255,0,0) end end end ) addCommandHandler('setmaxspeed', function(plr,cmd,maxVelocity) if isPedInVehicle(plr) and getPedOccupiedVehicleSeat(plr) == 0 then if tonumber(maxVelocity) >= 0.1 and tonumber(maxVelocity) <= 200000 then vehicle = getPedOccupiedVehicle(plr) setVehicleHandling(vehicle,'maxVelocity',tonumber(maxVelocity)) else outputChatBox('ERROR',plr,255,0,0) end end end )
-
function saveonlogout(prevA) local player = getAccountPlayer(prevA) local money = getPlayerMoney( player ) local occupation = getElementData( player, "Occupation") local team = getPlayerTeam( player ) local teamname = getTeamName( team ) local x,y,z = getElementPosition( player ) local dimension = getElementDimension( player ) local interior = getElementInterior( player ) local skin = getElementModel( player ) outputChatBox("You are logged out") if money and occupation and team and x and y and z and dimension and interior and skin and teamname then local savelocation = mysql_query(moduledb, "UPDATE 'playerlocations' SET x = '"..x.."', y = '"..y.."', z = '"..z.."' WHERE accountname = '"..prevA.."'") local saveothers = mysql_query(moduledb, "UPDATE 'playerinfo' SET money = '"..money.."', occupation = '"..occupation.."', team = '"..teamname.."', dimension = '"..dimension.."', interior = '"..interior.."', skin = '"..skin.."' WHERE accountname = '"..prevA.."'") --mysql_free_result(savelocation) --mysql_free_result(saveothers) else outputChatBox("Error! Cannot save informations!") end end addEventHandler("onPlayerLogout",getRootElement(),saveonlogout)
-
onPlayerLogin getPlayerSerial banPlayer
