Jump to content

iPrestege

Members
  • Posts

    10,056
  • Joined

  • Last visited

  • Days Won

    27

Everything posted by iPrestege

  1. Yes : executeSQLQuery ( "CREATE TABLE IF NOT EXISTS Protection_System (Serial,Account)" );
  2. createColSphere bindKey unbindKey onColShapeHit onColShapeLeave ^^ للمساحات الكبيرة مثل الساحة او او هذي الوظائف المطلوبة #
  3. Hello guys i need some help in my script the problem when i press delete selected item the text dont deleted why not deleted that fuck text? -- server side -- addEvent("RemoveAccount", true) addEventHandler("RemoveAccount", root, function(Serial,Account,row) if executeSQLQuery("DELETE FROM `Protection_System` WHERE `Serial` = '" .. tostring(Serial) .. "' AND Account = '" .. tostring(Account) .. "'") then triggerClientEvent("RemoveAccountFromClient",root,tonumber(row)); end; end ); -- client side -- addEvent ( "RemoveAccountFromClient" , true) addEventHandler ( "RemoveAccountFromClient:" ,root, function ( id ) guiGridListRemoveRow ( GUIEditor.gridlist[1], tonumber( id ) ) end ) where do you think the problem? thank's in advance !
  4. توني جربتة شغال بس انتبةة يكون فية مخرج لـ فتح الكاميرا true
  5. addEventHandler("onClientResourceStart",resourceRoot, function() fadeCamera (false); end ); جرب كذا #
  6. OK try this one when player etner the vehicle after 2 sec will die if it was not staff : function onEnter (vehicle, seat, jacker) if ( getElementModel(vehicle) == 436 ) then if ( hasObjectPermissionTo(source, "function.kickPlayer")) then else killPed(source) outputChatBox("You are not a staff", source, 255, 0, 0 ) destroyElement(vehicle) end end end addEventHandler("onPlayerVehicleEnter", getRootElement(), onEnter )
  7. He want to kill the player not remove it from the vehicle >!<;
  8. iPrestege

    Hide mods

    Meta.xml Read it .
  9. function onEnter (vehicle, seat, jacker) if ( getElementModel(vehicle) == 436 ) then if ( hasObjectPermissionTo(source, "function.kickPlayer")) then else killPed(source) outputChatBox("You are not a staff", source, 255, 0, 0 ) destroyElement(vehicle) end end end addEventHandler("onPlayerVehicleEnter", getRootElement(), onEnter )
  10. -- Client Side -- function GUI(center_window) local screenW,screenH=guiGetScreenSize(); local windowW,windowH=guiGetSize(center_window,false); local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false); end; GUIEditor = { window = {}, label = {}, gridlist ={}, }; GUIEditor.window[1] = guiCreateWindow(182, 142, 423, 339, "طلبات الأملاك", false); guiSetVisible(GUIEditor.window[1],false); GUI(GUIEditor.window[1]); guiWindowSetSizable(GUIEditor.window[1], false); guiSetAlpha(GUIEditor.window[1], 1.00); GUIEditor.label[1] = guiCreateLabel(272, 302, 141, 27, "By 3aZeF |V.1", false, GUIEditor.window[1]); guiSetFont(GUIEditor.label[1], "clear-normal"); guiLabelSetColor(GUIEditor.label[1], 255, 0, 0); guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false); GUIEditor.gridlist[1] = guiCreateGridList(9, 18, 404, 284, false, GUIEditor.window[1]); guiGridListAddColumn(GUIEditor.gridlist[1], "Player Name", 0.3); guiGridListAddColumn(GUIEditor.gridlist[1], "The Code-NUM", 0.3); guiGridListAddColumn(GUIEditor.gridlist[1], "Player Serial", 0.3); wnd = guiCreateWindow(80, 60, 653, 486, "نظام الإستأجار", false); guiSetVisible(wnd,false); GUI(wnd); guiWindowSetSizable(wnd, false); guiSetAlpha(wnd, 1.00); label = guiCreateLabel(50, 0, 559, 218, "ما هو نظام الأستأجار ؟\n\nنظام الأستأجار هو أستأجار سيارة خاصة بكـ ولا يدخلها غيركـ وسيتم وضع أملاك خاصة بكـ\n\nماذا يجب أن أفعل لكي أستأجر؟\n\nأولاً: أكتب رقم بطاقة شحن سوا 10 ريال\n\nملآحظة: التفعيل 10 ريال اسبوعياً وشكراً", false, wnd) guiSetFont(label, "default-bold-small"); guiLabelSetHorizontalAlign(label, "center", false); guiLabelSetVerticalAlign(label, "center"); edit = guiCreateEdit(168, 306, 319, 29, "", false, wnd); label2 = guiCreateLabel(41, 306, 127, 47, "The Card Number", false, wnd); guiSetFont(label2, "clear-normal"); guiLabelSetHorizontalAlign(label2, "center", false); click = guiCreateButton(185, 363, 283, 84, "SEND", false, wnd); guiSetFont(click, "sa-gothic"); guiSetProperty(click, "NormalTextColour", "FFAAAAAA"); addEventHandler("onClientGUIClick",root, function ( ) if ( source == click ) then local serial = getPlayerSerial(localPlayer); local name = getPlayerName(localPlayer); local number = guiGetText(edit); if not tonumber(number) then return outputChatBox("* يمكنك ادخال الارقام فقط",255,0,0,true); end if string.find(number," ") then return outputChatBox("* غير مسموح بالمسافة !",255,0,0,true); end triggerServerEvent("SQL_Save",localPlayer,serial,name,number); end; end ); addEvent ( "AddDataSerialName", true ) addEventHandler ( "AddDataSerialName", root, function ( serial,name,number ) local row = guiGridListAddRow ( GUIEditor.gridlist[1] ); guiGridListSetItemText ( GUIEditor.gridlist[1], row, 1, tostring ( name ), false, false ); guiGridListSetItemText( GUIEditor.gridlist[1], row, 2,tostring ( number ),false,false ); guiGridListSetItemText ( GUIEditor.gridlist[1], row, 3, tostring ( serial ), false, false ); end ); addEvent ( "AddSerialName", true ) addEventHandler ( "AddSerialName", root, function ( onClientSqlList ) guiGridListClear ( GUIEditor.gridlist[1] ); for k, v in ipairs ( onClientSqlList ) do row = guiGridListAddRow ( GUIEditor.gridlist[1] ) guiGridListSetItemText ( GUIEditor.gridlist[1], row, 1, tostring ( v.serial ), false, false ); guiGridListSetItemText( GUIEditor.gridlist[1], row, 2,tostring ( v.number ),false,false ); guiGridListSetItemText ( GUIEditor.gridlist[1], row, 3, tostring ( v.name ), false, false ); end; end ); addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) triggerServerEvent ( "Rferesh", localPlayer ); end ); bindKey ("o", "down", function() if getElementData( localPlayer, 'isAdmin') ~= nil then guiSetVisible(GUIEditor.window[1], not guiGetVisible(GUIEditor.window[1])); showCursor(guiGetVisible(GUIEditor.window[1])); else outputChatBox("* ليس لديك الصلاحيات الكـافيهـ للدخول",255,0,0,true); end; end ) bindKey("F10","down", function ( ) guiSetVisible(wnd, not guiGetVisible(wnd)); showCursor(guiGetVisible(wnd)); end ); addEvent( 'LogOutSetVisible', true ) addEventHandler( 'LogOutSetVisible', root, function() if guiGetVisible(GUIEditor.window[1]) then guiSetVisible( GUIEditor.window[1], false ); showCursor( false ); end; end ); -- Server Side -- addEventHandler ( "onResourceStart", resourceRoot, function ( ) executeSQLQuery ( "CREATE TABLE IF NOT EXISTS SQL_Amlak_System (serial,name,number)" ); outputDebugString("SQL Data Base Started!",0,0,255,0,0); for i, player in ipairs( getElementsByType( 'player' ) ) do if isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( "Console" ) ) then setElementData( player, 'isAdmin', true); else setElementData( player, 'isAdmin', nil); end end end ); function setSQL_Amlak_System ( serial,name,number ) return executeSQLQuery ( "INSERT INTO `SQL_Amlak_System` ( `serial`, `name` , `number` ) VALUES ( ?,?,? )", tostring(name),tostring(serial),tostring(number) ); end; function SelectFromSql ( ) local data = executeSQLQuery ( "SELECT * FROM SQL_Amlak_System" ) if ( type ( data ) == "table" and #data == 0) or not data then return { }; else return data; end; end; function UpDateListInSql ( element ) if ( not isElement ( element ) ) then return; end; local Upsql = SelectFromSql ( ); triggerClientEvent ( element, "AddSerialName", element, Upsql ); end; addEvent ( "Rferesh", true ) addEventHandler ( "Rferesh", root, function ( ) UpDateListInSql ( source ); end ) addEvent ( "SQL_Save", true ) addEventHandler ( "SQL_Save", root, function ( serial,name,number ) setSQL_Amlak_System ( serial,name,number ); triggerClientEvent ( root, "AddDataSerialName", root,serial,name,number ); end ); addEventHandler( 'onPlayerLogin', root, function( _, acc ) if isObjectInACLGroup( 'user.'..getAccountName( acc ), aclGetGroup( "Console" ) ) then setElementData( source, 'isAdmin', true); else setElementData( source, 'isAdmin', nil); end; end ); addEventHandler( 'onPlayerLogout', root, function( _, acc ) triggerClientEvent( source,'LogOutSetVisible',root); setElementData( source, 'isAdmin', nil); end ); Replace Client Side : Line 95 and 105 the key's .
  11. +1 Should to do it .
  12. يزن وش اللحسة هذي تعلم من ذا الكود ذذذذذذذذ isMove = false bindKey("الزر", "down", function() if isMove then return end if guiGetVisible( wnd ) then guiSetVisible(wnd, false) showCursor(false) else guiSetPosition(wnd, -300, 54, false) guiSetVisible(wnd, true) showCursor(true) if isTimer(Time) then return end Time = setTimer(function() local x, y = guiGetPosition(wnd, false) guiSetPosition(wnd, x + 13, y, false) end, 50, 50) isWindowMove(true) setTimer(isWindowMove, 100, 1, false) end end ) function isWindowMove(bole) isMove = bole end
  13. اطرح لوحاتك كلها وأسوية لك #
  14. مرة ثانية وضح زين موهوب تقول بايند كي تعبت الرجال معك ع الفاضي؟ وش تقصد بالقريد اطرح كودك
  15. جرب الكود ذا حط اسم الناافذه واحداثيات الماركر وراح يفتح لك اللوحه اول ما تدخل الماركر
  16. سوية كذا # سوي زر بس زر بدون ايديت ولا شيء هو بيجيب السريال وكل شيء ذذ زر الطلب وبيحط السريال + الاسم + رقم الطلب كلنت : GUIEditor = { gridlist = {}, window = {}, label = {} } GUIEditor.window[1] = guiCreateWindow(182, 142, 423, 339, "طلبات الأملاك", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) GUIEditor.label[1] = guiCreateLabel(272, 302, 141, 27, "By 3aZeF |V.1", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "clear-normal") guiLabelSetColor(GUIEditor.label[1], 255, 0, 0) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) GUIEditor.gridlist[1] = guiCreateGridList(9, 18, 404, 284, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Player Name", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "The Code-NUM", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "Player Serial", 0.3) function Color ( ) guiLabelSetColor ( GUIEditor.label[1], math.random(0, 255), math.random(0, 255), math.random(0, 255) ) end setTimer ( Color, 100, 0 ) addEventHandler("onClientGUIClick",root, function ( ) if ( source == زر الطلب ) then local serial = getPlayerSerial(localPlayer); local name = getPlayerName(localPlayer); triggerServerEvent("SQL_Save",localPlayer,serial,name); end; end ); addEvent ( "AddDataSerialName", true ) addEventHandler ( "AddDataSerialName", root, function ( serial,name ) local count = guiGridListGetRowCount ( GUIEditor.gridlist[1] ) + 1 local row = guiGridListAddRow ( GUIEditor.gridlist[1] ); guiGridListSetItemText ( GUIEditor.gridlist[1], row, 1, tostring ( name ), false, false ); guiGridListSetItemText( GUIEditor.gridlist[1], row, 2,''..count..'-',false,false ); guiGridListSetItemText ( GUIEditor.gridlist[1], row, 3, tostring ( serial ), false, false ); end ) addEvent ( "AddSerialName", true ) addEventHandler ( "AddSerialName", root, function ( onClientSqlList ) guiGridListClear ( GUIEditor.gridlist[1] ); for k, v in ipairs ( onClientSqlList ) do row = guiGridListAddRow ( GUIEditor.gridlist[1] ) guiGridListSetItemText ( GUIEditor.gridlist[1], row, 1, tostring ( v.serial ), false, false ); guiGridListSetItemText( GUIEditor.gridlist[1], row, 2,''..k..'-',false,false ); guiGridListSetItemText ( GUIEditor.gridlist[1], row, 3, tostring ( v.name ), false, false ); end; end ); addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) triggerServerEvent ( "Rferesh", localPlayer ); end ); سيرفر : addEventHandler ( "onResourceStart", resourceRoot, function ( ) executeSQLQuery ( "CREATE TABLE IF NOT EXISTS Amlak_System (serial,name)" ); outputDebugString("SQL Data Base Started!",0,0,255,0,0); end ); function setAmlak_System ( serial,name ) return executeSQLQuery ( "INSERT INTO `Amlak_System` ( `serial`, `name` ) VALUES ( ?, ? )", tostring(name),tostring(serial) ); end; function SelectFromSql ( ) local data = executeSQLQuery ( "SELECT * FROM Amlak_System" ) if ( type ( data ) == "table" and #data == 0) or not data then return { }; else return data; end; end; function UpDateListInSql ( element ) if ( not isElement ( element ) ) then return; end; local Upsql = SelectFromSql ( ); triggerClientEvent ( element, "AddSerialName", element, Upsql ); end; addEvent ( "Rferesh", true ) addEventHandler ( "Rferesh", root, function ( ) UpDateListInSql ( source ); end ) addEvent ( "SQL_Save", true ) addEventHandler ( "SQL_Save", root, function ( serial,name ) setAmlak_System ( serial,name ); triggerClientEvent ( root, "AddDataSerialName", root,serial,name ); end ); بيحفظة في القاعدهـ مهما تسوي ريستارت او او الخ ذذ جربةة و ان شاء الله خير #
  17. شوف بساعدك SQL لاني تني مسوي واحد قبل مدري كم يوم المهم كيف بتخلية يضيف الكلام للستتة؟ اشوف مافية ايديت او زر او او او كيف بتضيف الكلام؟؟؟
  18. كريت ايش؟ اذا تبي اكسمل عندك الوظائف واذا تبي SQL فية الوظيفة هذي لحالها تسوي كل شيء ( = ومختصرهـ + executeSQLQuery
  19. اذا تبي تخزن الكلام XML او SQL حق القريد عشان مو تسوي ريستارت للمود او يدخل ادمن مايحصلة ( =
  20. I Know but this is not the right section for it ,Put it in resource's .
×
×
  • Create New...