PaiN^
Members-
Posts
2,258 -
Joined
-
Last visited
Everything posted by PaiN^
-
Here !! if igot you right
-
addEventHandler("onClientPlayerDamage", root, function(attacker) if attacker and getElementType(attacker) == "player" and getPlayerTeam(attacker) ~= "Police" then local team = getPlayerTeam(source) if team and team == getTeamFromName("Police") then cancelEvent() setElementHealth(attacker, getElementHealth(attacker) - 20) end end end )
-
جرب -- server Team = createTeam ( "Team", 0, 255, 0 ) addEventHandler ( "onPlayerLogin", root, function ( _, Account ) if getAccountName ( Account ) == "إسم الحساب" or "إسم الحساب" then setPlayerTeam( source, Team ) end end )
-
على كذا جرب حق أسامة و إن ما إشتغل إطرح كل شي الميتا + السيرفر + الكلنت
-
-- Client addEventHandler("onClientPlayerDamage", root, function(attacker) if attacker and getElementType(attacker) == "player" then local team = getPlayerTeam(source) if team and team == getTeamFromName ("Police") then cancelEvent() setElementHealth(attacker, getElementHealth(attacker) - 50) end end end ) -- Server for _,v in ipairs( getElementsByType( "team" ) ) do setTeamFriendlyFire( v, false ) end
-
Team = createTeam( "Team", 0, 255, 0 ) addEventHandler( "onPlayerLogin", root, function ( theCurrentAccount ) if ( theCurrentAccount == "user.إسم الحساب" ) then setPlayerTeam( source, "Team" ) end end )
-
مشكورين بس لو تحولوا kickPlayer إلى banPlayer *_^ يكون أحسن
-
آهآآآآ مشكور أخوي أسامة ما قصرت دايمـ تصححلي ذذ
-
Was missing a then at line 5 ^^ ..
-
خطأ =| ^ خالط كلنت وسيرفر وكوكتيل أحداث ذذ =D وين فنكشنات السيرفر؟؟ كلها كلنت + كودك بس لو خرج من الماركر يقفل النافذة, المفروض يكون فيه guiSetVisible ( GUIEditor_Window[1], false ) showCursor( false ) مع "onClientGUIClick"
-
yazan = createMarker( -2924.978515625, -736.68469238281, 170.08749389648, "cylinder", 2, 255, 255, 255, 150 ) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(149,62,486,448,"ختيار الفريق",false) GUIEditor_Image[1] = guiCreateStaticImage(120,248,78,191,"images/yazan2.png",false,GUIEditor_Window[1]) GUIEditor_Image[2] = guiCreateStaticImage(327,249,82,190,"images/yazan1.png",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(329,211,76,35,"الاردن",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(121,219,77,29,"السعودية",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(9,87,477,65,"ليس الهدف ان تكون اردني او سعودي او اي دوله تم صنع مود من اجل تسليه فقط",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(209,223,121,24,"نحنا اخوان كلنا عرب",false,GUIEditor_Window[1]) addEventHandler("onClientMarkerHit", yezan, function ( player ) if ( getElementType(player) == "player" ) then guiSetVisible ( GUIEditor_Window[1], true ) showCursor( true ) end end ) addEventHandler( "onClientGUIClick", root, function ( player ) if ( getElementType(player) == "player" ) then if ( player == GUIEditor_Button[1] ) then setElementPosition( localPlayer, -2924.978515625, -736.68469238281, 170.08749389648) outputChatBox( "تم نقلك الى فريق الاردن", player, 255, 0, 0 , true ) guiSetVisible ( GUIEditor_Window[1], false ) showCursor( false ) elseif ( player == GUIEditor_Button[2] ) then setElementPosition( localPlayer, -2990.9272460938, -437.00.256347656, 164.16250610352) outputChatBox("تم نقلك الى فريق السعودية", player, 255, 0, 0, true ) guiSetVisible ( GUIEditor_Window[1], false ) showCursor( false ) end end end ) يحتاج ناحية سيرفر عشان يحط اللاعب بالفريق
-
Make sure that all functions are set to true ..
-
src="admin" startup="1" protected="0"/> src="defaultstats" startup="1" protected="0"/> src="helpmanager" startup="1" protected="0"/> src="joinquit" startup="1" protected="0"/> src="mapcycler" startup="1" protected="0"/> src="mapmanager" startup="1" protected="0"/> src="parachute" startup="1" protected="0"/> src="resourcebrowser" startup="1" protected="1" default="true"/> src="resourcemanager" startup="1" protected="1"/> src="scoreboard" startup="1" protected="0"/> src="spawnmanager" startup="1" protected="0"/> src="voice" startup="1" protected="0" /> src="votemanager" startup="1" protected="0"/> src="webadmin" startup="1" protected="0"/> src="Example" startup="1" protected="0"/> You'll find it at the end of the mtaserver.conf file at the game folder just but your resource name inserted of Exanple at the last line, And copy more lines and add more resources ( As much as you want ) And it well work automatically when the server start ^^ ..
-
--> server addEventHandler( "onResourceStart", getResourceRootElement( getThisResource() ), function ( player ) if ( getElementType ( player ) == "player" ) then for i,Teams in ipairs ( getElementsByType ( "team" ) ) do local team = getTeamFromName ( "إسمـ الفريق" ) if ( team ) then outputChatBox( "A team with the same name already exist !!", player, 255, 0, 0, true ) setTeamFriendlyFire( "إسمـ الفريق", false ) else createTeam( "إسمـ الفريق", 255, 0, 0 ) setTeamFriendlyFire( "إسمـ الفريق", false ) end end end end ) بدل "إسمـ الفريق " بإسمـ فريقك وبيشتغل إن شاء الله
-
You're right, I didn't put that in mind
-
I don't thing that the functions : setAccountData, getAccountData Are required for this type of code . + He said he wants a marker to be created so he will need these functions : isObjectInACLGroup -- server only function getElementPosition -- server and client function setElementPosition -- server and client function createMarker -- server and client function -------------------- addCommandHandler -- server and client side **NOTE : This code will be server side !!
-
You can stop it from the Admin Panel, Go to the Resources tap, Then search for a resource called [ votemanger ], And then double click on it, Modify settings like you wish, And it shall work .. ;D
-
كلامـ تابل صح عشان كذا المود ما راح يشتغل + أنا ما عدلت فيه ولا شي, زيي ما هو من يوم طرحته
-
ههههههههه إنت شكلك ما طليت فيه أصلاً كودي يطلع أول ما يخش اللاعب, لأن فيه "onClientPlayerJoin" ويطلع بزر أنا حاطلك إنك إنت تختاره أول الكود فوق key = "الزر" كيف تقولي ما وصلت لآ أضمن عمله لكن جرب ثمـ إحكمـ
