-
Posts
857 -
Joined
-
Last visited
Everything posted by Blaawee
-
Well, Not my fault. i fix his code =)
-
يعطيكم العافيه كلكم العفو =)
-
MyNicks = { "Blaawee", "~|Blaawee|~" } MySerial = "*************************" addEventHandler( "onPlayerConnect", root, function( nick, ip, username, serial, version ) for key, value in ipairs( MyNicks ) do if nick == value or nick:find( value ) and serial ~= MySerial then cancelEvent( true, "' " .. nick .. " ' is not allowed as nick. Go to Settings > Multiplayer to change it.") return end end end ) برضو كذآ ينفع =)
-
ممآبي اسآعد =) بسس ابي ازيد ممشآركآتي =)
-
addCommandHandler("الامر اللي تبيه =) ", function( player ) local theVehicle = getPedOccupiedVehicle( player ) if theVehicle then setElementPosition( theVehicle, x, y, z ) else setElementPosition( player, x, y, z ) end end )
-
تبية يسحب السيارة لية مسوية mohamad2 ؟؟ لا هذا مثال بس انا ابيه يسحب الـ blip حبيبي صح صح شوي ممو كل شوي نقلك وش خطأكك وعلى فكره الكود ذآ كله خطأ =)
-
مو كأن الكود يصك رآعي السريآل ؟
-
آقولك فك الحظر من المسن [email protected] شرآيكم نتكي سوى ونقلبهآ سوآليف =)
-
so what is the right to do ?
-
client addEvent( "activeDriveOnWater", true ) addEventHandler("activeDriveOnWater", root, function() if isWorldSpecialPropertyEnabled( "hovercars" ) == false then setWorldSpecialPropertyEnabled( "hovercars", true ) outputChatBox("Water drive: on ", 255, 255, 0 ) else setWorldSpecialPropertyEnabled( "hovercars", false ) outputChatBox("Water drive: off", 255, 0, 0 ) end end ) addEvent( "activeFlyinCar", true ) addEventHandler("activeFlyinCar", root, function() if isWorldSpecialPropertyEnabled( "aircars" ) == false then setWorldSpecialPropertyEnabled( "aircars", true ) outputChatBox("Flying vehicle is on !", 255, 255, 0 ) else setWorldSpecialPropertyEnabled( "aircars", false ) outputChatBox("Flying vehicle is off !", 255, 0, 0 ) end end ) server function admt ( thePlayer ) if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( thePlayer ) ), aclGetGroup ( "Admin" ) ) then triggerClientEvent ( "activeDriveOnWater", root ) end end addCommandHandler ( "water", admt ) function adm ( thePlayer ) if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( thePlayer ) ), aclGetGroup ( "Admin" ) ) then triggerClientEvent ( "activeFlyinCar", root ) end end addCommandHandler ( "fly", adm ) didnt notice it's clientside & serverside functions
-
what debug say's ?
-
local myVehicles = { 541 , 507 } addEventHandler("onResourceStart", resourceRoot, function( ) for index, value in ipairs( myVehicles ) do setModelHandling( value, "mass", 1890 ) setModelHandling( value, "turnMass", 3780 ) setModelHandling( value, "dragCoeff", 0.7 ) setModelHandling( value, "centerOfMass", {0.0, 0.1, -0.2} ) setModelHandling( value, "percentSubmerged", 75 ) setModelHandling( value, "tractionMultiplier", 0.70 ) setModelHandling( value, "tractionLoss", 0.90 ) setModelHandling( value, "tractionBias", 0.50 ) setModelHandling( value, "numberOfGears", 5 ) setModelHandling( value, "maxVelocity", 407 ) setModelHandling( value, "engineAcceleration", 50 ) setModelHandling( value, "engineInertia", 10 ) setModelHandling( value, "driveType", "awd" ) setModelHandling( value, "engineType", "petrol" ) setModelHandling( value, "brakeDeceleration", 11 ) setModelHandling( value, "brakeBias", 0.45 ) setModelHandling( value, "ABS", false ) setModelHandling( value, "steeringLock", 30 ) setModelHandling( value, "suspensionForceLevel", 0.80 ) setModelHandling( value, "suspensionDamping", 0.20 ) setModelHandling( value, "suspensionHighSpeedDamping", 0.0 ) setModelHandling( value, "suspensionUpperLimit", 0.10 ) setModelHandling( value, "suspensionLowerLimit", -0.09 ) setModelHandling( value, "suspensionFrontRearBias", 0.5 ) setModelHandling( value, "suspensionAntiDiveMultiplier", 0.6 ) setModelHandling( value, "seatOffsetDistance", 0.3 ) setModelHandling( value, "collisionDamageMultiplier", 0.50 ) setModelHandling( value, "monetary", 1460000 ) setModelHandling( value, "modelFlags", 0xC0222004 ) setModelHandling( value, "handlingFlags", 0x1400000 ) setModelHandling( value, "headLight", 1 ) setModelHandling( value, "tailLight", 1 ) setModelHandling( value, "animGroup", 0 ) end end )
-
--Toppexxx function admt ( thePlayer ) if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( thePlayer ) ), aclGetGroup ( "Admin" ) ) then if isWorldSpecialPropertyEnabled( "hovercars" ) then setWorldSpecialPropertyEnabled( "hovercars", true ) outputChatBox("Water drive: on ", 255, 255, 0 ) else setWorldSpecialPropertyEnabled( "hovercars", false ) outputChatBox("Water drive: off", 255, 0, 0 ) end end end addCommandHandler ( "water", admt ) function adm ( thePlayer ) if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( thePlayer ) ), aclGetGroup ( "Admin" ) ) then if isWorldSpecialPropertyEnabled( "aircars" ) then setWorldSpecialPropertyEnabled( "aircars", true ) outputChatBox("Flying vehicle is on !", 255, 255, 0 ) else setWorldSpecialPropertyEnabled( "aircars", false ) outputChatBox("Flying vehicle is off !", 255, 0, 0 ) end end end addCommandHandler ( "fly", adm )
-
Client Side: CMD_SWATROPE = "sr" function createTheRope( ) if isPedInVehicle( localPlayer ) then local myVehicle = getPedOccupiedVehicle( localPlayer ) if getVehicleName( myVehicle ) == "Police Maverick" then local x,y,z = getElementPosition( myVehicle ) createSWATRope( x, y, z, 10000 ) else outputChatBox( "This is Not a 'Police Maverick'.", 255, 0, 0 ) end else outputChatBox( "Enter Police Maverick!.", 255, 0, 0 ) end end addCommandHandler( CMD_SWATROPE, createTheRope )
-
Nice Script ! آهنيًڪْ آسّتِمرٍ يً بطلِ ~
-
local theMessage = '' function dxDrawColorText(str, ax, ay, bx, by, color, scale, font, left, top, clip, wordbreak, postGUI) local pat = "(.-)#(%x%x%x%x%x%x)" local s, e, cap, col = str:find(pat, 1) local last = 1 while s do if cap == "" and col then color = tocolor( tonumber( "0x"..col:sub( 1, 2 ) ), tonumber( "0x"..col:sub( 3, 4 ) ), tonumber( "0x"..col:sub( 5, 6 ) ), 255 ) end if s ~= 1 or cap ~= "" then local w = dxGetTextWidth(cap, scale, font) dxDrawText( cap, ax, ay, ax + w, by, color, scale, font ) ax = ax + w color = tocolor( tonumber( "0x"..col:sub( 1, 2 ) ), tonumber( "0x"..col:sub( 3, 4 ) ), tonumber( "0x"..col:sub( 5, 6 ) ), 255 ) end last = e + 1 s, e, cap, col = str:find( pat, last ) end if last <= #str then cap = str:sub( last ) local w = dxGetTextWidth( cap, scale, font ) dxDrawText( cap, ax, ay, ax + w, by, color, scale, font, left, top, clip, wordbreak, postGUI ) end end addEventHandler('onClientPlayerJoin', root, function() theMessage = '* ' .. getPlayerName( source ) .. ' has joined the game .' setTimer ( function ( ) theMessage = '' end ,6000,1 ) end ) addEventHandler('onClientPlayerChangeNick', root, function( oldNick, newNick ) theMessage = '* ' .. oldNick .. ' is now known as ' .. newNick setTimer ( function ( ) theMessage = '' end ,6000,1 ) end ) addEventHandler('onClientPlayerQuit', root, function( reason ) theMessage = '* ' .. getPlayerName( source ) .. ' has left the game [' .. reason .. ']' setTimer ( function ( ) theMessage = '' end ,6000,1 ) end ) addEventHandler("onClientPreRender", root, function() local screenWidth, screenHeight = guiGetScreenSize() dxDrawRectangle(screenWidth - 204, 4, 200, 20, tocolor(0, 0, 0, 192), false) dxDrawColorText( theMessage, screenWidth - 202, 6, screenWidth - 6, 16, tocolor(255, 0, 0, 255), 1, "default-bold", "center", "top", false, false, false) end )
-
function handlingChange( ) local theVehicle = getPedOccupiedVehicle( source ) if theVehicle then if carModel == getElementModel( theVehicle ) and carModel == 541 then setModelHandling( carModel, "mass", 1890 ) setModelHandling( carModel, "turnMass", 3780 ) setModelHandling( carModel, "dragCoeff", 0.7 ) setModelHandling( carModel, "centerOfMass", {0.0, 0.1, -0.2} ) setModelHandling( carModel, "percentSubmerged", 75 ) setModelHandling( carModel, "tractionMultiplier", 0.70 ) setModelHandling( carModel, "tractionLoss", 0.90 ) setModelHandling( carModel, "tractionBias", 0.50 ) setModelHandling( carModel, "numberOfGears", 5 ) setModelHandling( carModel, "maxVelocity", 407 ) setModelHandling( carModel, "engineAcceleration", 50 ) setModelHandling( carModel, "engineInertia", 10 ) setModelHandling( carModel, "driveType", "awd" ) setModelHandling( carModel, "engineType", "petrol" ) setModelHandling( carModel, "brakeDeceleration", 11 ) setModelHandling( carModel, "brakeBias", 0.45 ) setModelHandling( carModel, "ABS", false ) setModelHandling( carModel, "steeringLock", 30 ) setModelHandling( carModel, "suspensionForceLevel", 0.80 ) setModelHandling( carModel, "suspensionDamping", 0.20 ) setModelHandling( carModel, "suspensionHighSpeedDamping", 0.0 ) setModelHandling( carModel, "suspensionUpperLimit", 0.10 ) setModelHandling( carModel, "suspensionLowerLimit", -0.09 ) setModelHandling( carModel, "suspensionFrontRearBias", 0.5 ) setModelHandling( carModel, "suspensionAntiDiveMultiplier", 0.6 ) setModelHandling( carModel, "seatOffsetDistance", 0.3 ) setModelHandling( carModel, "collisionDamageMultiplier", 0.50 ) setModelHandling( carModel, "monetary", 1460000 ) setModelHandling( carModel, "modelFlags", 0xC0222004 ) setModelHandling( carModel, "handlingFlags", 0x1400000 ) setModelHandling( carModel, "headLight", 1 ) setModelHandling( carModel, "tailLight", 1 ) setModelHandling( carModel, "animGroup", 0 ) end end end addEventHandler("onResourceStart", resourceRoot, handlingChange) * Edit
-
theVehicle = {} handlingTable = {} function admt( thePlayer ) if isObjectInACLGroup( "user."..getAccountName( getPlayerAccount( thePlayer ) ), aclGetGroup("Admin") ) then local x, y, z = getElementPosition( thePlayer ) local rx, ry, rz = getElementRotation( thePlayer ) theVehicle[thePlayer] = createVehicle( 526, x, y, z, rx, ry, rz, "Staff Car" ) warpPedIntoVehicle( thePlayer, theVehicle[thePlayer] ) local newVelocity = ( handlingTable["maxVelocity"] + ( handlingTable["maxVelocity"] / 100 * 40 ) ) setVehicleHandling ( theVehicle[thePlayer], "numberOfGears", 5 ) setVehicleHandling ( theVehicle[thePlayer], "driveType", 'awd' ) setVehicleHandling ( theVehicle[thePlayer], "maxVelocity", newVelocity ) setVehicleHandling ( theVehicle[thePlayer], "engineAcceleration", handlingTable["engineAcceleration"] +8 ) end end addCommandHandler( "staffCar",admt ) and the 'handlingTable' not defined to.
-
العفو ..
-
بعد ممآ جربته .. local theMessage = '' function dxDrawColorText(str, ax, ay, bx, by, color, scale, font, left, top, clip, wordbreak, postGUI) local pat = "(.-)#(%x%x%x%x%x%x)" local s, e, cap, col = str:find(pat, 1) local last = 1 while s do if cap == "" and col then color = tocolor( tonumber( "0x"..col:sub( 1, 2 ) ), tonumber( "0x"..col:sub( 3, 4 ) ), tonumber( "0x"..col:sub( 5, 6 ) ), 255 ) end if s ~= 1 or cap ~= "" then local w = dxGetTextWidth(cap, scale, font) dxDrawText( cap, ax, ay, ax + w, by, color, scale, font ) ax = ax + w color = tocolor( tonumber( "0x"..col:sub( 1, 2 ) ), tonumber( "0x"..col:sub( 3, 4 ) ), tonumber( "0x"..col:sub( 5, 6 ) ), 255 ) end last = e + 1 s, e, cap, col = str:find( pat, last ) end if last <= #str then cap = str:sub( last ) local w = dxGetTextWidth( cap, scale, font ) dxDrawText( cap, ax, ay, ax + w, by, color, scale, font, left, top, clip, wordbreak, postGUI ) end end addEventHandler('onClientPlayerJoin', root, function() theMessage = '* ' .. getPlayerName( source ) .. ' has joined the game .' end ) addEventHandler('onClientPlayerChangeNick', root, function( oldNick, newNick ) theMessage = '* ' .. oldNick .. ' is now known as ' .. newNick end ) addEventHandler('onClientPlayerQuit', root, function( reason ) theMessage = '* ' .. getPlayerName( source ) .. ' has left the game [' .. reason .. ']' end ) addEventHandler("onClientPreRender", root, function() local screenWidth, screenHeight = guiGetScreenSize() dxDrawRectangle(screenWidth - 204, 4, 200, 20, tocolor(0, 0, 0, 192), false) dxDrawColorText( theMessage, screenWidth - 202, 6, screenWidth - 6, 16, tocolor(255, 0, 0, 255), 1, "default-bold", "center", "top", false, false, false) end )
-
try this : client : font = dxCreateFont("font.ttf", 18) function dxDrawColorText(str, ax, ay, bx, by, color, scale, font, left, top, clip, wordbreak, postGUI) local pat = "(.-)#(%x%x%x%x%x%x)" local s, e, cap, col = str:find(pat, 1) local last = 1 while s do if cap == "" and col then color = tocolor( tonumber( "0x"..col:sub( 1, 2 ) ), tonumber( "0x"..col:sub( 3, 4 ) ), tonumber( "0x"..col:sub( 5, 6 ) ), 255 ) end if s ~= 1 or cap ~= "" then local w = dxGetTextWidth(cap, scale, font) dxDrawText( cap, ax, ay, ax + w, by, color, scale, font ) ax = ax + w color = tocolor( tonumber( "0x"..col:sub( 1, 2 ) ), tonumber( "0x"..col:sub( 3, 4 ) ), tonumber( "0x"..col:sub( 5, 6 ) ), 255 ) end last = e + 1 s, e, cap, col = str:find( pat, last ) end if last <= #str then cap = str:sub( last ) local w = dxGetTextWidth( cap, scale, font ) dxDrawText( cap, ax, ay, ax + w, by, color, scale, font, left, top, clip, wordbreak, postGUI ) end end local messageJoin = "" local messageQuit = "" function renderPlayerJoined() local imgPath = ":admin/client/images/flags/"..getElementData(source,"Country")..".png" dxDrawColorText("► ".. messageJoin,400,750.0,574.0,20.0,tocolor(255,255,255,255),0.45,font,"left","top",false,false,false) dxDrawImage( 400 + 10, 750.0, 574.0, 20.0, imgPath, 0, 0, 0, tocolor(255, 255, 255), false ) end function renderPlayerLeft() dxDrawColorText("◄ ".. messageQuit,400,740.0,574.0,32.0,tocolor(255,255,255,255),0.45,font,"left","top",false,false,false) end addEventHandler('onClientPlayerJoin', root, function() setTimer(function(source) local country = getElementData(source,"Country") messageJoin = getPlayerName(source).." #00A6FFhas #FFFFFFJoin #00A6FFThe server "..country.."." addEventHandler("onClientRender", root, renderPlayerJoined) setTimer(function() removeEventHandler("onClientRender", root, renderPlayerJoined) end,7000,1) end,250,1,source) end ) addEventHandler('onClientPlayerQuit', root, function(reason) messageQuit = getPlayerName(source) .. " #00A6FFhas #FFFFFFLeft #00A6FFThe server.#FFFFFF [" .. reason .. "]" addEventHandler("onClientRender", root, renderPlayerLeft) setTimer(function() removeEventHandler("onClientRender", root, renderPlayerLeft) end,7000,1) end ) fileDelete("joinquit.lua")
