-
Posts
1,363 -
Joined
-
Last visited
Everything posted by Max+
-
Et-win setWeaponTarget need to write how to target at , also there is a problem with minigun fire rotation also why they aren't colored becuase they are new , addCommandHandler ('mini', function ( ) if not (isAllownedPlayer(localPlayer)) then return end local nx, ny, nz = getElementPosition ( localPlayer ) local minigunw = createWeapon ( 'minigun', nx, ny, nz +1 ) setWeaponClipAmmo ( minigunw,99999) setWeaponState ( minigunw,"firing") setWeaponProperty( minigunw, "fire_rotation", 0, -30, 0 ) for _, nMax in ipairs ( getElementsByType ('player' )) do x, y, z = getElementPosition ( nMax ) setWeaponTarget ( minigunw ,nMax, 255 ) end end )
-
--serverSide , local gate = createObject(17951, 1556.36, -2348.79, 13.54, 0, 0, 180) local marker = createMarker(1554, -2348.79, 12.54, "cylinder", 2, 255, 255, 255, 255) local garage = createObject(17950, 1560.36, -2348.79, 13.54, 0, 0, 90) addEventHandler ( 'onMarkerHit', marker, function ( hitElement ) if ( getElementType ( hitElement ) == 'player' and not isPedInVehicle ( hitElement )) then if ( getAccountName(getPlayerAccount(hitElement)) == 'Florjan22') then moveObject(gate, 5000, 1556.36, -2348.79, 16.54) end end end ) addEventHandler ( 'onMarkerLeave', marker, function ( LeaveElement ) if ( getElementType ( LeaveElement ) == 'player' and not isPedInVehicle ( LeaveElement )) then if ( getAccountName(getPlayerAccount(LeaveElement)) == 'Florjan22') then moveObject(gate, 5000, 1556.36, -2348.79, 13.54) end end end ) Edited ,
-
خش هنا , http://www.dev-point.com/vb/t325098.html وتابع الشرح اللي سويته زين , بعد ماتطلع لك التعريفات , ثبت تعريف Intel اول , وسوي ريستارت وبعدين ثبت النفيديا
-
ذا ينفع عند بدء المود وهو داخل السيرفر موجود اذا يبي وهو يدخل السيرفر يستخدم اللي عطيته , لا انت فاهم الحدث غلط يظبط في حاله الدخول كمان وش اللي يضبط في حالة الدخول كمان onClientResourceStart عند تشغيل الريسوس . . . اول مره اشوف حدث عند تشغيل سكربت ينفع مع حدث دخول الاعب وتشغيل الصوت . .
-
ذا ينفع عند بدء المود وهو داخل السيرفر موجود اذا يبي وهو يدخل السيرفر يستخدم اللي عطيته ,
-
'onPlayerJoin' triggerClientEvent --- to play sound ,
-
كيف تسوي حدث سيرفر مع فنكشن كلينت ؟
-
--ClientSide if didn't work then make it 'onClientPlayerDamage' and change toggleControl to cancelEvent ( ) addEventHandler ( "onClientPlayerWeaponFire", root, function ( weapon ) if ( isElement( localPlayer) ) and ( getElementType( localPlayer ) == "player" ) and ( weapon == 0 ) then if (getElementData(localPlayer, 'soco') == true) then toggleControl ( "fire", false ) else toggleControl ( "fire", true ) end end end )
-
You'r Right , he could use toggleControl
-
It doesn't need a player argument on the client side, it will only work for the local player. Oh Right i saw the server argument ,
-
you forgot to add localPlayer inside the getPlayerMoney ( ) or just replace it with c
-
ايه اسمها GUN + PC , PS 2 تمت ازالة الرابط من قبل المشرفين وفقاً لقوانين المنتدى العامة عن عدم نشر محتوى يتضمن القرصنة
-
.. نفس الشي، كذا راح تحتاج تحدد الماركر ماراح تضبط إلا بطريقة وحدة بس بسألك هل تعرف هالطريقة؟ ادري احدد الماركر بس مايحتاج احدد اللي دخل الماركر هو سيارة ولا لاعب .
-
قديم جدا هه اما طيب ليه نستخدم عند دخول الماركر ونحدد السورس دام نقدر نستخدم ذا بدون تحديد اللي دخل الماركر صح ؟
-
عيال شوفو وش لقيت بدال مانسوي onMarkerHit ونحدد السورس اللي دخل .. [url=https://wiki.multitheftauto.com/wiki/OnPlayerMarkerHit]https://wiki.multitheftauto.com/wiki/OnPlayerMarkerHit[/url] [url=https://wiki.multitheftauto.com/wiki/OnPlayerMarkerLeave]https://wiki.multitheftauto.com/wiki/On ... arkerLeave[/url] شكله جديد الافنت ذا ؟
-
1 - https://community.multitheftauto.com/ind ... ew&id=6760 2 - https://community.multitheftauto.com/ind ... ls&id=6164 3 - https://community.multitheftauto.com/ind ... ls&id=6536
-
It's missing ')' after 'soco' in getElementData function, you've used parentheses after comparing it with true. Also, source is not defined in addCommandHandler function. XeoN-, Try this: Client addEventHandler("onClientPlayerWeaponFire",root, function ( weapon ) if ( weapon == 0 ) and (getElementData(localPlayer, 'soco') == true) then cancelEvent ( ) end end) Server addCommandHandler("tirarsoco", function (sourcePlayer) local list9 = 0 for _ , v in ipairs ( getElementsByType ('player' )) do if not (isAllownedPlayer(v)) then return end local isPlayerInEvento = getElementData( v, "Evento" ) if (isPlayerInEvento) then setElementData(v, "soco", true) outputChatBox("#FFF000[EVENTO]#FFFFFF "..getPlayerName(sourcePlayer).." Deleted your hands",root, 255, 255, 255, true) list9 = list9 + 1 outputChatBox("#FFF000[EVENTO]#FFFFFF You deleted soco of "..list9.." players", sourcePlayer, 255, 255, 255, true) end end end) Ops, Thank's For telling me that .
-
You'r welcome iam Happy For you for learning step by step and as Et-win said No, you Don't Good Luck ,
-
i don't see any event with the command = repair add this on the bottom addEventHandler ( 'onPlayerCommand', resourceRoot, blockRepairCmdFunc )
-
تسلم لكن كودك فيه خطآ كذا مايطلع الماركر المفروض كذا local Marker = createMarker(1148, 1366, 9, 'cylinder', 2.0, 255, 0, 0, 150 ) addEventHandler ( 'onMarkerHit', Marker, function ( hitElement ) if ( getElementType ( hitElement ) == 'player') and ( getElementModel ( hitElement) ~= 263 ) then setElementModel ( hitElement, 263 ) outputChatBox ( 'Skin Changed ', hitElement, 255, 255, 0 ) else outputChatBox ( 'You alredy have the Skin ', hitElement, 255, 0, 0 ) end end ) وشكرا شباب كودي صح بس انت مستخدم طريقة ثانية لتحديد الشخصية : )
-
والله ياخوي لو اني فاضي صممت لك بس جالس اخلص القيم مود حقي , بس ولايهمك اي مساعدة تبي نساعدك هنا ,
-
---ServerSide local Marker = createMarker(1148, 1366, 13, 'cylinder', 2.0, 255, 0, 0, 150 ) addEventHandler ( 'onMarkerHit', Marker, function ( hitElement ) if ( getElementType ( hitElement ) == 'player') then if not ( getElementModel ( hitElement )) == 287 then setElementModel ( hitElement, 287 ) outputChatBox ( 'Skin Changed ', hitElement, 255, 255, 0 ) else outputChatBox ( 'You alredy have the Skin ', hitElement, 255, 0, 0 ) end end end )
-
--client vehWnd = guiCreateWindow(324, 200, 468, 387, "Police Vehicle Spawner", false) guiWindowSetSizable(vehWnd, false) guiSetVisible(vehWnd, false) carsG = guiCreateGridList(59, 137, 131, 220, false, vehWnd) guiGridListAddColumn(carsG, "Vehicle", 0.9) vehicles = { {"Police Car", 596}, {"Police Ranger", 599}, } for i,vehicles in ipairs(vehicles) do row = guiGridListAddRow(carsG) guiGridListSetItemText(carsG, row, 1, tostring(vehicles[1]), false, false) guiGridListSetItemData(carsG, row, 1, tostring(vehicles[2])) end guiGridListAddRow(carsG) spawnbtn = guiCreateButton(205, 314, 125, 43, "Spawn", false, vehWnd) desc = guiCreateMemo(43, 33, 384, 94, "Here you can spawn yourself a vehicle!\n", false, vehWnd) guiMemoSetReadOnly(desc, true) local vehmarker = createMarker ( 1555.4000244141, -1610.9000244141,12.300000190735, "cylinder", 2.5, 100, 149, 237, 170 ) function spawnStart(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(vehWnd) then guiSetVisible(vehWnd, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", vehmarker, spawnStart) function spawnVeh() if ( source == spawnbtn ) then local row, col = guiGridListGetSelectedItem( carsG ) local id = guiGridListGetItemData( carsG, row, col ) triggerServerEvent("spawn", getLocalPlayer(), id) guiSetVisible(vehWnd,false) showCursor(false) end end addEventHandler("onClientGUIClick",root,spawnVeh) --server function spawnVeh(id) local playerTeam = getPlayerTeam ( source ) local teamName = ( playerTeam and getTeamName ( playerTeam ) or "" ) if ( teamName == "Police" ) then local x,y,z = getElementPosition(source) createVehicle(id,x+5,y,z) end end addEvent("spawn", true) addEventHandler("spawn",root,spawnVeh)
-
[url=https://wiki.multitheftauto.com/wiki/OnClientVehicleDamage]https://wiki.multitheftauto.com/wiki/On ... icleDamage[/url]