Jump to content

PaiN^

Members
  • Posts

    2,258
  • Joined

  • Last visited

Everything posted by PaiN^

  1. .. loop بس منت معرفها بالـ freindly fire بالتحقق من الـ Police إنت كنت حاط
  2. local allTeams = getElementsByType ( "team" ) for index, theTeam in ipairs(allTeams) do if ( getTeamFriendlyFire ( theTeam ) == true ) then -- switch it on setTeamFriendlyFire ( theTeam, false ) end end
  3. Didn't know that, Thanx =) outputs = { 'text1', 'text2', 'text3' }; setTimer ( function ( ) outputChatBox ( outputs[math.random(#outputs)] ); end, 60000, 0 );
  4. Yes, outputs = { 'text1', 'text2', 'text3' }; setTimer ( outputChatBox, 60000, 0, outputs[math.random(#outputs)] );
  5. PaiN^

    colshape

    You're welcome + Client --> onClientColShapeHit
  6. PaiN^

    colshape

    onColShapeHit <-- Server Side ...
  7. PaiN^

    colshape

    Are you sure of your coordinates ? + Is't server side in the meta.xml ?
  8. غير إسمـ الموضوع + تواصل مع المبرمجين إللي يسوا مودات بفلوس, لأن ما اظن في احد بيكمله لك ببلاش + ياليت تتواصل معاهم خاص
  9. PaiN^

    colshape

    local colshape = createColCuboid( 1107.72, -2080.25, 0, 194, 100, 100) function projectiles(hitElement) if source == colshape then local data = getElementData(hitElement, "Basejuli") if getElementType(hitElement) == "player" then if data == "Aceptado" then outputChatBox("Bienvenido a la base", 0, 255, 0) elseif data == "Rechazado" or nil then outputChatBox("Intruso detectado. Lanzando projectiles...", 255, 0, 0) end end end end addEventHandler("onColShapeHit", root, projectiles)
  10. PaiN^

    What's wrong ?

    local serverContainer = {} serverContainer.Settings = {} -- settings serverContainer.Settings.user = 'zahrej' serverContainer.Settings.pass = " Can't tell you it :* " serverContainer.Settings.host = 'mysql.mmhost.eu:3306' serverContainer.Settings.name = 'zahrej' serverContainer.startResource = function() local connection = dbConnect('mysql', 'dbname='..serverContainer.Settings.name..';host='..serverContainer.Settings.host, serverContainer.Settings.user, serverContainer.Settings.pass) if connection then outputDebugString('[MYBB-CONNECTER]: Could connect to the mysql server') serverContainer.connection = connection; else outputDebugString('[MYBB-CONNECTER]: Couldn\'t connect to the mysql server') end end addEventHandler('onResourceStart', resourceRoot, serverContainer.startResource) serverContainer.loginClient = function(user, pass) local qh = dbQuery(serverContainer.connection,'SELECT * FROM mtamembers WHERE username = ?',user) local result, row, errmsg = dbPoll ( qh, 5000 ) if row > 0 then for id, result in ipairs(result) do local salt = result['salt'] local username = result['username'] local password = result['password'] if salt and username and password then local newPass = md5(md5(salt):lower()..md5(pass):lower()):lower() if newPass == password then triggerClientEvent(source,'onClientSuccessfullyLogin',source) outputChatBox('#ff6666[sERVER]#ffffff You have successfully login.', source,1,1,1,true) else outputChatBox('#ff6666[sERVER]#ffffff This account doesn\'t exists or the password is wrong.', source,1,1,1,true) end end end end end addEvent('onClientLogins', true) addEventHandler('onClientLogins', root, serverContainer.loginClient)
  11. Yep, It should been 'row' insted of '0', Sorry
  12. Why don't you create a table with all the weapons you want and loop it to add rows ? Ex : Weapons = { 'AK-47', 'Baseball Bat', 'CZ 550', 'Desert Eagle', 'Golf Club', 'Hatchet', 'Lee Enfield', 'M1911', 'M4', 'M9 SD', 'MP5A5', 'PDW', 'SPAZ-12 Shotgun', 'Sawn-Off Shotgun', 'Shovel', 'Winchester 1866' } for _,w in next, Weapons do local row = guiGridListAddRow(paineldayz.gridlist[1]) guiGridListSetItemText(paineldayz.gridlist[1], row, 1, w, false, false) end
  13. خليه سيرفر https://wiki.multitheftauto.com/wiki/Server_Scripting_Functions#Text_functions
  14. PaiN^

    Gui widget

    getElementsByType( 'gui-staticimage' ) ;
  15. أنا جربت كذا بس ما نفع :\ addEventHandler( 'onClientGUIChanged', root, function ( ) if source == GUIEditor.edit[2] then local ID = guiGetText ( source ); if not ( tonumber(ID) ) then return end; end end );
  16. صح ؟ onClientGUIChanged بس الحدث المفروض
  17. السلآمـ عليكمـ الموضوع باين من عنواانه, كيف أخلي إيديت ما يقبل لا أرقام ؟
  18. Server : addEventHandler ( 'onPlayerWasted', root, function ( attacker ) if attacker and attacker ~= source then local weapon = getPedWeapon ( source ); local ammo = getPedTotalAmmo ( source ); if weapon == 0 then return end; if ammo == 0 then return end; local x, y, z = getElementPosition ( source ); createPickup ( x, y, z, 2, weapon, _, ammo ); end end );
  19. In the beginning of your script : grid = guiCreateGridList ( ... ) And then you can use it in all the functions ..
  20. About the "On" thing, It's just a typing mistake, But you're right, All i thought about was the damage and not the ability to walk . Abologise =D + Thanx for the info ..
×
×
  • Create New...