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)
guiSetVisible ( GUIEditor_Window[1], 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])
CloseBtn = guiCreateButton(430,20,35,35,"X",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", yazan,
function ( hitElement )
if ( guiGetVisible ( GUIEditor_Window[1] ) == false ) and ( getElementType ( hitElement ) == "player" ) then
guiSetVisible ( GUIEditor_Window[1], true )
showCursor ( true )
end
end
)
addEventHandler ( "onClientMarkerLeave", yazan,
function ( leftElement )
if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) and ( getElementType ( leftElement ) == "player" ) then
guiSetVisible ( GUIEditor_Window[1], false )
showCursor ( false )
end
end
)
addEventHandler ( "onClientGUIClick", root,
function ( )
if ( source == GUIEditor_Button[1] ) then
setElementPosition( localPlayer, -2924.978515625, -736.68469238281, 170.08749389648)
setElementModel ( localPlayer, 105 )
triggerServerEvent ( source, "team", source )
outputChatBox('تم نقلك الى فريق الاردن', 255, 255, 255, true )
elseif ( source == GUIEditor_Button[2] ) then
setElementPosition( localPlayer, -2990.9272460938, -437.00256347656, 164.16250610352)
setElementModel ( localPlayer, 128 )
triggerServerEvent ( source, "team1", source )
outputChatBox('تم نقلك الى فريق السعودية', 255, 255, 255, true )
elseif ( source == CloseBtn ) then
guiSetVisible ( GUIEditor_Window[1], false )
showCursor ( false )
end
end
)
server
addEvent ( "team", true )
addEventHandler ( "team", root,
function assignNewTeam ( source, commandName, theTeam )
local theTeam = createTeam ( KSA )
if theTeam then
setPlayerTeam ( source, theTeam )
end
end
addCommandHandler ( "gimmeateam", assignNewTeam )
function unassignTeam ( source, commandName )
local theTeam = getPlayerTeam ( source ) -- Check if the player is on a team
if theTeam then -- this player is on a team, so we can remove them from it
setPlayerTeam ( source, nil ) -- remove the player from the current team
end
end
addCommandHandler ( "takeawaymyteam", unassignTeam )
------------------------------------------
addEvent ( "team1", true )
addEventHandler ( "team1", root,
function assignNewTeam ( source, commandName, theTeam )
local theTeam = createTeam ( jordan )
if theTeam then
setPlayerTeam ( source, theTeam )
end
end
addCommandHandler ( "gimmeateam", assignNewTeam )
function unassignTeam ( source, commandName )
local theTeam = getPlayerTeam ( source ) -- Check if the player is on a team
if theTeam then -- this player is on a team, so we can remove them from it
setPlayerTeam ( source, nil ) -- remove the player from the current team
end
end
addCommandHandler ( "takeawaymyteam", unassignTeam )
خطأ كلة -_-" وانشاء التيمات