-
Posts
1,992 -
Joined
-
Last visited
-
Days Won
4
Everything posted by 3NAD
-
Stats = { [22] = { 69 }; [23] = { 70 }; [24] = { 71 }; [25] = { 72 }; [26] = { 73 }; [27] = { 74 }; [28] = { 75 }; [29] = { 76 }; [30] = { 77 }; [31] = { 78 }; [34] = { 79 }; }; addEventHandler ( "onPlayerWasted", root, function ( ammo, killer, weapon, bodypart ) if killer then if getElementType ( killer ) == "player" then if killer ~= source then if Stats[tonumber(weapon)] then setPedStat ( killer, Stats[tonumber(weapon)][1], getPedStat ( killer, Stats[tonumber(weapon)][1] ) + 1 ) end end end end end )
-
-- Client Side addEventHandler("onClientGUIClick",GUIEditor.button[6], function ( ) local sel, col = guiGridListGetSelectedItem(gridList) if sel ~= -1 then triggerServerEvent("wanted1",localPlayer,tostring(guiGridListGetItemText(gridList,sel,1))) end end , false ) -- Server Side addEvent("wanted1",true) addEventHandler("wanted1",root, function ( name ) local player = getPlayerFromName ( name ) if player then setPlayerWantedLevel ( player, 1 ) outputChatBox ( getPlayerName ( player ) .. " has become a 1 star", source ) end end )
-
جرب function color () if not isElement(blip[source]) then blip[source] = createBlipAttachedTo(source) end local theTeam = getPlayerTeam(source) if theTeam then local r, g, b = getTeamColor(theTeam) setPlayerNametagColor(source, r, g, b) setBlipColor(blip[source], r, g, b, 255) setPlayerName(source,getPlayerName(source):gsub('#%x%x%x%x%x%x',RGBToHex(r,g,b))) else if not isElement(blip[source]) then blip[source] = createBlipAttachedTo(source) end local r, g, b = math.random(200), math.random(200), math.random(200) setPlayerNametagColor(source, r, g, b) setBlipColor(blip[source], r, g, b, 255) end end addEventHandler ( "onPlayerLogin", root, color )
-
سطر 12 خل الشرط .. [إذا لم يتحقق] يعني كذا if not .... then
-
يجي بمكانك ماركر .. marker الان كود اذا كتبت باف8
3NAD replied to |~| ALCKASER |~|'s topic in البرمجة
وش الخطأ بالكود ؟ -
الطريقة غير مجربة ** سويت لك كود يسهل عملية طلبك وهو ان وجد الكلمة راح ينفذ الإيفنت Words = { ["ابي سيارة"] = "onOrderVehicle"; ["ابي سلاح"] = "onOrderWeapon"; --[ "Word" ] = "Event"; }; addEventHandler ( "onPlayerChat", root, function ( msg, type ) if type == 0 then for word, event in pairs ( Words ) do if string.find ( msg, tostring(word) ) then triggerEvent ( tostring(event), source ) end end end end ) و عادي تخلي الإيفنت بـ مود و جدول الكلمات مع كوده بـ مود منفرد Vehicles = { }; addEvent ( "onOrderVehicle", true ) addEventHandler ( "onOrderVehicle", root, function ( ) local x, y, z = getElementPosition ( source ) if Vehicles[source] then if isElement ( Vehicles[source] ) then destroyElement ( Vehicles[source] ) end Vehicles[source] = nil end Vehicles[source] = createVehicle ( math.random ( 400, 611 ), x, y+1, z+1 ) setTimer ( warpPedIntoVehicle, 100, 1, source, Vehicles[source] ) end ) addEvent ( "onOrderWeapon", true ) addEventHandler ( "onOrderWeapon", root, function ( ) giveWeapon ( source, math.random ( 22, 38 ), 60, true ) end )
-
.:[ انطلاق الموقع الخاص بسيرفر محترفين الالعاب ]:.
3NAD replied to Bssol's topic in Arabic / العربية
عمل رائع . موفق يا بسول # -
addEventHandler ( "onPlayerWasted", root, function ( killer, weapon, bodypart ) if killer then if getElementType ( killer ) == "player" then if killer ~= source then for i = 21, 25 do setPedStat ( killer, i, getPedStat ( killer, i ) + 1 ) end for i = 69 , 79 do setPedStat ( killer, i, getPedStat ( killer, i ) + 1 ) end end end end end )
-
Put your meta.xml of 'Class' resource ?
-
function connect ( name ) if name:gsub ( "#%x%x%x%x%x%x", "" ) == "" then cancelEvent ( true, "Invisible name." ) end end addEventHandler ( "onPlayerConnect", root, connect )
-
اظن من هنا تلقى الموزعين المعتمدين لـ كروت كاش يو https://www.cashu.com/site/ar/topup
-
تم تحديث الموضوع .
-
https://wiki.multitheftauto.com/wiki/GetPlayerVehicle
-
-- Server Side g_Root = getRootElement() g_ResRoot = getResourceRootElement(getThisResource()) g_PlayerData = {} g_VehicleData = {} g_ArmedVehicles = { [425] = false, [447] = false, [520] = false, [430] = false, [464] = false, [432] = false } g_Trailers = { [606] = false, [607] = false, [610] = false, [590] = false, [569] = false, [611] = false, [584] = false, [608] = false, [435] = false, [450] = false, [591] = false } g_RPCFunctions = { addPedClothes = { option = 'clothes', descr = 'Modifying clothes' }, addVehicleUpgrade = { option = 'upgrades', descr = 'Adding/removing upgrades' }, fadeVehiclePassengersCamera = true, fixVehicle = { option = 'repair', descr = 'Repairing vehicles' }, giveMeVehicles = { option = 'createvehicle', descr = 'Creating vehicles' }, giveMeWeapon = { option = 'weapons.enabled', descr = 'Getting weapons' }, givePedJetPack = { option = 'jetpack', descr = 'Getting a jetpack' }, killPed = { option = 'kill', descr = 'Killing yourself' }, removePedClothes = { option = 'clothes', descr = 'Modifying clothes' }, removePedFromVehicle = true, removePedJetPack = { option = 'jetpack', descr = 'Removing a jetpack' }, removeVehicleUpgrade = { option = 'upgrades', descr = 'Adding/removing upgrades' }, setElementAlpha = { option = 'alpha', descr = 'Changing your alpha' }, setElementPosition = true, setElementInterior = true, setMyGameSpeed = { option = 'gamespeed.enabled', descr = 'Setting game speed' }, setMySkin = { option = 'setskin', descr = 'Setting skin' }, setPedAnimation = { option = 'anim', descr = 'Setting an animation' }, setPedFightingStyle = { option = 'setstyle', descr = 'Setting fighting style' }, setPedGravity = { option = 'gravity.enabled', descr = 'Setting gravity' }, setPedStat = { option = 'stats', descr = 'Changing stats' }, setTime = { option = 'time.set', descr = 'Changing time' }, setTimeFrozen = { option = 'time.freeze', descr = 'Freezing time' }, setVehicleColor = true, setVehicleOverrideLights = { option = 'lights', descr = 'Forcing lights' }, setVehicleRotation = true, setWeather = { option = 'weather', descr = 'Setting weather' }, spawnMe = true, warpMe = { option = 'warp', descr = 'Warping' } } g_OptionDefaults = { alpha = true, anim = true, clothes = true, createvehicle = true, gamespeed = { enabled = true, min = 0.0, max = 3 }, gravity = { enabled = true, min = 0, max = 0.1 }, jetpack = true, kill = true, lights = true, paintjob = true, repair = true, setskin = true, setstyle = true, spawnmaponstart = true, spawnmapondeath = true, stats = true, time = { set = true, freeze = true }, upgrades = true, warp = true, weapons = { enabled = true, vehiclesenabled = true, disallowed = {} }, weather = true, welcometextonstart = true, vehicles = { maxidletime = 60000, idleexplode = true, maxperplayer = 2, disallowed = {} } } function getOption(optionName) local option = get(optionName:gsub('%.', '/')) if option then if option == 'true' then option = true elseif option == 'false' then option = false end return option end option = g_OptionDefaults for i,part in ipairs(optionName:split('.')) do option = option[part] end return option end addEventHandler('onResourceStart', g_ResRoot, function() table.each(getElementsByType('player'), joinHandler) end ) function joinHandler(player) if not player then player = source end local r, g, b = math.random(50, 255), math.random(50, 255), math.random(50, 255) setPlayerNametagColor(player, r, g, b) g_PlayerData[player] = { vehicles = {} } g_PlayerData[player].blip = createBlipAttachedTo(player, 0, 2, r, g, b) if g_FrozenTime then clientCall(player, 'setTimeFrozen', true, g_FrozenTime[1], g_FrozenTime[2], g_FrozenWeather) end if getOption('welcometextonstart') then outputChatBox('[ Welcome ] ', player, 255,0,0) outputChatBox('[ Welcome ] ', player, 0,255,0, 0) outputChatBox('[ Welcome ] ', player, 0,0,255) outputChatBox('[ Welcome ] ', player, 255,255,0) end end addEventHandler('onPlayerJoin', g_Root, joinHandler) addEvent('onLoadedAtClient', true) addEventHandler('onLoadedAtClient', g_ResRoot, function(player) if getOption('spawnmaponstart') and isPedDead(player) then clientCall(player, 'showWelcomeMap') end end, false ) addEventHandler('onPlayerWasted', g_Root, function() if not getOption('spawnmapondeath') then return end local player = source setTimer( function() if isPedDead(player) then clientCall(player, 'showMap') end end, 2000, 1 ) end ) addEvent('onClothesInit', true) addEventHandler('onClothesInit', g_Root, function() local result = {} local texture, model -- get all clothes result.allClothes = {} local typeGroup, index for type=0,17 do typeGroup = {'group', type = type, name = getClothesTypeName(type), children = {}} table.insert(result.allClothes, typeGroup) index = 0 texture, model = getClothesByTypeIndex(type, index) while texture do table.insert(typeGroup.children, {id = index, texture = texture, model = model}) index = index + 1 texture, model = getClothesByTypeIndex(type, index) end end -- get current player clothes { type = {texture=texture, model=model} } result.playerClothes = {} for type=0,17 do texture, model = getPedClothes(source, type) if texture then result.playerClothes[type] = {texture = texture, model = model} end end triggerClientEvent(source, 'onClientClothesInit', source, result) end ) addEvent('onPlayerGravInit', true) addEventHandler('onPlayerGravInit', g_Root, function() triggerClientEvent('onClientPlayerGravInit', source, getPedGravity(source)) end ) function setMySkin(skinid) if isPedDead(source) then local x, y, z = getElementPosition(source) if isPedTerminated(source) then x = 0 y = 0 z = 3 end local r = getPedRotation(source) local interior = getElementInterior(source) spawnPlayer(source, x, y, z, r, skinid) setElementInterior(source, interior) setCameraInterior(source, interior) else setElementModel(source, skinid) setElementHealth(source, 100) end setCameraTarget(source, source) setCameraInterior(source, getElementInterior(source)) end function spawnMe(x, y, z) if not x then x, y, z = getElementPosition(source) end if isPedTerminated(source) then repeat until spawnPlayer(source, x, y, z, 0, math.random(9, 288)) else spawnPlayer(source, x, y, z, 0, getPedSkin(source)) end setCameraTarget(source, source) setCameraInterior(source, getElementInterior(source)) end function warpMe(targetPlayer) if
-
هذي علامة الأس 2^4 = 2 * 2 * 2 * 2 = 16
-
https://community.multitheftauto.com/in ... ls&id=7769
-
-- Client Side local f = 0 local t bindKey ( "f", "down", function ( ) if f >= 4 then return triggerServerEvent ( "onKickPlayer", localPlayer ) end if isTimer ( t ) then killTimer ( t ) end f = f+1 t = setTimer ( function ( ) f = 0 end, 1000, 0 ) end ) -- Server Side addEvent ( "onKickPlayer", true ) addEventHandler ( "onKickPlayer", root, function ( ) kickPlayer ( source, "Keyboard Spam 'F'." ) end )