-
Posts
1,862 -
Joined
-
Days Won
8
Everything posted by Rockyz
-
مود رهيب , بالتوفيق
-
يقصد الي سوى الموضوع ^^^
-
Example : local Test = createTeam ( "Test", 0, 255, 0 ) -- isEventHandlerAdded [ BY iMr.Dawix~# ] function isEventHandlerAdded ( sEventName, pElementAttachedTo, func ) if type( sEventName ) == 'string' and isElement( pElementAttachedTo ) and type( func ) == 'function' then local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo ) if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then for i, v in ipairs( aAttachedFunctions ) do if v == func then return true end end end end return false end function OpenTeam ( ) setElementData ( source, "ZZZ", false ) end function CloseTeam ( ) setElementData ( source, "ZZZ", true ) end addCommandHandler ( "OpenTheTeam", function ( ) for k, v in ipairs ( getElementsByType ( "player" ) ) do if ( getElementData ( v, "ZZZ" ) == true ) then if not ( isEventHandlerAdded ( "onResourceStart", resourceRoot, CloseTeam ) ) then addEventHandler ( "onResourceStart", resourceRoot, OpenTeam ) else removeEventHandler ( "onResourceStart", resourceRoot, CloseTeam ) end end end end ) addCommandHandler ( "CloseTheTeam", function ( ) for k, v in ipairs ( getElementsByType ( "player" ) ) do if ( getElementData ( v, "ZZZ" ) == false ) then if not ( isEventHandlerAdded ( "onResourceStart", resourceRoot, OpenTeam ) ) then addEventHandler ( "onResourceStart", resourceRoot, CloseTeam ) else removeEventHandler ( "onResourceStart", resourceRoot, OpenTeam ) end end end end ) addCommandHandler ( "EnterTheTeam", function ( plr ) if ( getElementData ( plr, "ZZZ" ) == false ) then setPlayerTeam ( plr, Test ) else outputChatBox ( "You Cant Enter Sorry .", plr, 255, 0, 0, true ) end end )
-
^ k = key, v = value هذا يسمى باللوب ( يدور على كل محتويات الشي الي تحدده ) و تقدر تغير ال k, v - الى اي شي مثلا _, plrs
-
جرب ذا : addEventHandler ( "onPlayerCommand", root, function ( msg ) if ( msg:find ( "register" ) ) then if ( #getAccountsBySerial ( getPlayerSerial ( source ) ) >= 2 ) then outputChatBox ( "You Can Register 2 time only", source, 255, 0, 0, true ) cancelEvent ( ) else outputChatBox ( "Thank You For Registering", source, 255, 0, 0, true ) end end end ) function registerPlayer(username,password,passwordConfirm) if ( #getAccountsBySerial ( getPlayerSerial ( source ) ) >= 2 ) then return exports["guimessages"]:outputServer (source, "#0000FF* #FFFFFF You Can Only Register 2 Time",255,255,255,true ) end if not (username == "") then if not (password == "") then if not (passwordConfirm == "") then if password == passwordConfirm then local account = getAccount (username,password) if (account == false) then local accountAdded = addAccount(tostring(username),tostring(password)) if (accountAdded) then triggerClientEvent(source,"hideRegisterWindow",getRootElement()) exports["guimessages"]:outputServer (source, "#0000FF* #FFFFFFYou have sucessfuly registered! [username: #ABCDEF" .. username .. " #FF0000| #FFFFFFPassword: #ABCDEF" .. password .. "#FFFFFF]",255,255,255,true ) setTimer(outputChatBox,800,1,"#0000FF* #FFFFFFYou can now login with your new account.",source,255,255,255,true ) else exports["guimessages"]:outputServer (source, "#0000FF* #FFFFFFAn unknown error has occured! Please choose a different username/password and try again.",255,255,255,true ) end else exports["guimessages"]:outputServer (source, "#0000FF* #FFFFFFError! An account with this username already exists!",255,255,255,true ) end else exports["guimessages"]:outputServer (source, "#0000FF* #FFFFFFError! Passwords do not match!",255,255,255,true) end else exports["guimessages"]:outputServer (source, "#0000FF* #FFFFFFError! Please confirm your password!",255,255,255,true) end else exports["guimessages"]:outputServer (source, "#0000FF* #FFFFFFError! Please enter a password!",255,255,255,true) end else exports["guimessages"]:outputServer (source, "#0000FF* #FFFFFFError! Please enter a username you would like to register with!",255,255,255,true) end end اذا ماضبط /debugscript 3
-
81 /'
-
ماشاء الله مبدع من بدايتك واصل
-
اذا تبي زر كيبورد -- # Client Side bindKey triggerServerEvent -- # Server Side table addEvent addEventHandler isObjectInACLGroup getElementsByType -- Loop [ tabel ] triggerClientEvent -- # Client Side addEvent addEventHandler guiSetVisible showCursor زر GUI -- # Client Side -- # Events : 'onClientGUIClick' triggerServerEvent -- # Server Side table addEvent addEventHandler isObjectInACLGroup getElementsByType -- Loop [ tabel ] triggerClientEvent -- # Client Side addEvent addEventHandler guiSetVisible showCursor
-
for a = 0, 100 do print ( " افكر بــ ... " .. a ) end
-
؟ لازم ذلين toJSON fromJSON setAccountData getAccountData ولا اقدر استخدم SQL لاني ماعرف toJSON fromJSON
-
السلام عليكم ابي فنكشنات معرض سيارات يعني في قريد ليست اخلي فيها اسم السيارة و الخ وبعدها لم اشتريها السيارة تنتقل للوحة ثانية فيها قريد ليست ( السيارات الي اشتريتهم ) ك واقدر اصلحهم و اعدلهم و الخ ..
-
You Dont Need A TRIGGER Try This : GUIEditor = { button = {}, window = {}, memo = {} } addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) GUIEditor.window[1] = guiCreateWindow(0.35, 0.35, 0.29, 0.31, "Trucking", true) guiWindowSetMovable(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 0.73) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFFFEFE") GUIEditor.button[1] = guiCreateButton(0.39, 0.38, 0.22, 0.05, "Accept Legal Load", true) GUIEditor.button[2] = guiCreateButton(0.39, 0.44, 0.22, 0.05, "Accept Illegal Load", true) GUIEditor.button[3] = guiCreateButton(0.40, 0.50, 0.21, 0.07, "Cancel", true) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFC30000") GUIEditor.memo[1] = guiCreateMemo(0.39, 0.58, 0.23, 0.07, "Trucking Job is new, it may have bugs. If you find any please report.", true) guiMemoSetReadOnly(GUIEditor.memo[1], true) guiSetVisible ( GUIEditor.window[1], false ) guiSetVisible ( GUIEditor.button[1], false ) guiSetVisible ( GUIEditor.button[2], false ) guiSetVisible ( GUIEditor.button[3], false ) guiSetVisible ( GUIEditor.memo[1], false ) end ) addEventHandler ( "onClientMarkerHit", resourceRoot, function ( hitElement ) if ( hitElement == localPlayer ) then if ( source == MARKER ) then guiSetVisible ( GUIEditor.window[1], true ) guiSetVisible ( GUIEditor.button[1], true ) guiSetVisible ( GUIEditor.button[2], true ) guiSetVisible ( GUIEditor.button[3], true ) guiSetVisible ( GUIEditor.memo[1], true ) end end end )