-
Posts
1,411 -
Joined
-
Last visited
-
Days Won
2
Everything posted by WASSIm.
-
i use function csiguusz its working but i make function get serial player if in ban list but not working
-
replace this if (getElementType(thePlayer) == "vehicle") then to this if getPedOccupiedVehicle(thePlayer) then
-
thank you why this not working function getPlayerBanSerial ( thePlayer ) assert ( isElement ( thePlayer ) and getElementType ( thePlayer ) == "player", "Bad player element" ) local playerSerial = getPlayerSerial(thePlayer) if ( thePlayer ) and ( playerSerial ) then local theBans = xmlNodeGetChildren( banlist ) for i, theNode in ipairs( theBans ) do local theValue = xmlNodeGetAttribute( theNode, "Serial" ) if ( theValue == tostring(playerSerial) ) then return theValue else return false end end end end
-
i have this idk how make this name="Joe" serial="123" time="57348957" reason="no reason" function getPlayerFromSerial(serial) if serial and type(serial) == "string" then for i, v in ipairs(getElementsByType("player")) do if getPlayerSerial(v) == serial then return v end end end return false end local theFile = xmlLoadFile ( "banlist.xml" ) if not ( theFile ) then theFile = xmlCreateFile( "banlist.xml","banlist" ) end xmlSaveFile( theFile ) addEvent( "getBanlistedPlayers", true ) function getBanlistedPlayers ( ) local BansTable = {} local theBans = xmlNodeGetChildren( theFile ) for i, theNode in ipairs( theBans ) do if ( getPlayerFromSerial ( xmlNodeGetValue( theNode ) ) ) then table.insert(BansTable,getPlayerFromSerial( xmlNodeGetValue( theNode ) ) ) end end return BansTable end addEventHandler( "getBanlistedPlayers", root, getBlacklistedPlayers ) function addPlayerBanlisted ( thePlayer ) local nodeExists = false local playerSerial = getPlayerSerial(thePlayer) if ( thePlayer ) and ( playerSerial ) then local theBans = xmlNodeGetChildren( theFile ) if #theBans >=1 then for i, theNode in ipairs( theBans ) do if ( xmlNodeGetValue( theNode ) == tostring(playerSerial) ) then nodeExists = true end end if not nodeExists then xmlNodeSetValue( xmlCreateChild( theFile, "userSerial" ), tostring ( playerSerial ) ) xmlSaveFile( theFile ) return true else return false end else xmlNodeSetValue( xmlCreateChild( theFile, "userSerial" ), tostring ( playerSerial ) ) xmlSaveFile( theFile ) return true end end end function removePlayerBanlisted ( thePlayer ) local playerSerial = getPlayerSerial(thePlayer) if ( thePlayer ) and ( playerSerial ) then local theBans = xmlNodeGetChildren( theFile ) for i, theNode in ipairs( theBans ) do if ( xmlNodeGetValue( theNode ) == tostring(playerSerial) ) then xmlDestroyNode ( theNode ) end end end end function isPlayerinBanlisted ( thePlayer ) local playerSerial = getPlayerSerial(thePlayer) if ( thePlayer ) and ( playerSerial ) then local theBans = xmlNodeGetChildren( theFile ) for i, theNode in ipairs( theBans ) do if ( xmlNodeGetValue( theNode ) == tostring(playerSerial) ) then return true else return false end end end end function onPlayerBanlisted ( _, _, _, serial ) if ( serial == isPlayerinBanlisted ( source ) )then cancelEvent(true) end end addEventHandler("onPlayerJoin",getRootElement(), antilogout)
-
المشكلة هنا أنه يقول النيل Client local theAccount = getClientAccount(guiGridListGetItemText (tabaccountslist,guiGridListGetSelectedItem(tabaccountslist),1)) outputChatBox(theAccount) function getClientAccount (account) triggerServerEvent( "onGetAccount", localPlayer, account ) end server function getNameAccount (account) getAccount(account) end addEvent( "onGetAccount", true ) addEventHandler( "onGetAccount", root, getNameAccount )
-
i make ban with serial and the serial save to file xml but how make save time and reason ?
-
isSoundFinished للتحقق من إن صوت أنتهت function Syntax bool isSoundFinished( element theSound ) Function Source function isSoundFinished ( theSound ) local length = getSoundLength( theSound ) local post = getSoundPosition( theSound ) if (post==length) then return true else return false end end مثال theSound = playSound("music/song.mp3") function checkSongFinish() local finish = isSoundFinished(theSound) if(finish == true) then outputChatBox("الانتهاء من الصوت!") else outputChatBox("لم يتم الانتهاء من الصوت!") end end addCommandHandler("checkfinish", checkSongFinish) Wiki https://wiki.multitheftauto.com/wiki/IsSoundFinished
-
hi guys. how make ban system ? What Bans system ?: ban system make can player banned join server but can't play. like this form CIT server
-
CLIENT addEventHandler ( "onClientGUIClick", getRootElement(), function ( ) local theAccount = getClientAccount(guiGridListGetItemText (tabaccountslist,guiGridListGetSelectedItem(tabaccountslist),1)) if ( guiGetSelectedTab(tabpanel) == tabaccounts)then if (source == tabaccountsdelete ) then if (theAccount) then triggerServerEvent( "onDeleteAccount", localPlayer, theAccount ) end end end end ) function getClientAccount (account) triggerServerEvent( "onGetAccount", localPlayer, account ) end SERVER function getNameAccount (account) getAccount(account) end addEvent( "onGetAccount", true ) addEventHandler( "onGetAccount", root, getNameAccount ) function DeleteAccount (theAccount) local nameAccount = getAccountName(theAccount) removeAccount(theAccount) exports["ZA-dxhelp"]:createNewHelpMessageForPlayer (source,"you'r Delete Account "..nameAccount, 0, 255, 0) end addEvent ( "onDeleteAccount", true ) addEventHandler ( "onDeleteAccount", getRootElement(), DeleteAccount)
-
CLIENT SIDE local hillArea = createColRectangle ( -2171.0678710938, 678.17950439453, 100, 100 ) local hillRadar = createRadarArea ( -2183.5678710938, 705.67950439453, 100, -100, 0, 255, 0, 175 ) function hill_Enter ( thePlayer, matchingDimension ) local keys1 = getBoundKeys("vehicle_fire") if keys1 then for keyName, state in pairs(keys1) do bindKey(keyName, "down", cdoshoot) end bindKey("F", "down", cdoshoot) end if (not keys1) then bindKey("F", "down", cdoshoot) bindKey("lctrl", "down", cdoshoot) bindKey("rctrl", "down", cdoshoot) end theVehicle = getPedOccupiedVehicle(thePlayer) allowShoots() if (getElementType(thePlayer) == "vehicle") then outputChatBox( getPlayerName(thePlayer) .. " Entrou na Zona Fun Seu Carro Pode Atirar Agora!", thePlayer, 255, 255, 109 ) setRadarAreaFlashing ( hillRadar, true ) end end addEventHandler ( "onClientColShapeHit", hillArea, hill_Enter ) function hill_Exit ( thePlayer, matchingDimension ) vehicles = getElementsByType("vehicle") for i,v in ipairs(vehicles) do destroyElement(v) if (getElementType(thePlayer) == "vehicle") then if isPlayerDead ( thePlayer ) ~= true then outputChatBox ( getPlayerName(thePlayer) .. " Saiu da Zona Fun Seu Carro Não Pode Atirar Mais!", thePlayer, 255, 255, 109 ) setRadarAreaFlashing ( hillRadar, false ) end end end end addEventHandler ( "onClientColShapeLeave", hillArea, hill_Exit ) function allowShoots() bindTrigger = 1 end function cdoshoot(thePlayer) if bindTrigger == 1 then local theVehicle = getPedOccupiedVehicle(thePlayer) if not isPlayerDead(thePlayer) and theVehicle then bindTrigger = 0 local x,y,z = getElementPosition(theVehicle) local rX,rY,rZ = getVehicleRotation(theVehicle) local x = x+4*math.cos(math.rad(rZ+90)) local y = y+4*math.sin(math.rad(rZ+90)) createProjectile(theVehicle, 19, x, y, z, 1.0, nil) setTimer(allowShoots, 3000, 1) end end end
-
ذا ضغط حساب في القائمة واضغط على زر حذف الحساب سيتم حذف ولكن يقول هذا حساب النيل
-
آسف لكنني عدلة بوست يرجى إعادة قراءة
-
شكرا هذه مشكلة أخرى فهو يقول النيل addEventHandler ( "onClientGUIClick", getRootElement(), function ( ) local theAccount = getClientAccount(guiGridListGetItemText (tabaccountslist,guiGridListGetSelectedItem(tabaccountslist),1)) if ( guiGetSelectedTab(tabpanel) == tabaccounts)then if (source == tabaccountsdelete ) then if (theAccount) then triggerServerEvent( "onDeleteAccount", localPlayer, theAccount ) end end end end ) function getClientAccount (account) triggerServerEvent( "onGetAccount", localPlayer, account ) end SERVER function getNameAccount (account) getAccount(account) end addEvent( "onGetAccount", true ) addEventHandler( "onGetAccount", root, getNameAccount )
-
مرحبا جميع أريد جعل قائمة حسابات في guiGridList ولكن لا شيء Client addEvent ( "onClientLoadAccountsList", true ) addEventHandler ( "onClientLoadAccountsList", root, function ( accounts ) guiGridListClear ( tabaccountslist ) for _, name in ipairs ( accounts ) do local row = guiGridListAddRow ( tabaccountslist ) guiGridListSetItemText ( tabaccountslist, row, tabaccountslistcolumn, name, false, false ) end end ) Server function onLoadAccountsList ( ) local accounts = { } for _, account in ipairs ( getAccounts ( ) ) do table.insert ( accounts, getAccountName ( account ) ) end triggerClientEvent ( "onClientLoadAccountsList", root, accounts ) end addEvent ( "onLoadAccountsList", true ) addEventHandler ( "onLoadAccountsList", getRootElement(), onLoadAccountsList )
-
everyone can lock this topic. its fake no resources
-
OMG!! Like GTA IV
-
FAILS EVERYWHERE i make one and uploaf it in community https://community.multitheftauto.com/in ... ls&id=7886
-
addEventHandler( 'onClientRender', root, function ( ) local Hour, Minutes = getTime() if Hour == 6 and Minutes == 0 then local sound = playSound("sounds/Morning.mp3") setSoundVolume(sound, 50.0) elseif Hour == 12 and Minutes == 0 then local sound = playSound("sounds/Day.mp3") setSoundVolume(sound, 50.0) elseif Hour == 15 and Minutes == 0 then local sound = playSound("sounds/Dusk.mp3") setSoundVolume(sound, 50.0) elseif Hour == 20 and Minutes == 0 then local sound = playSound("sounds/Night.mp3") setSoundVolume(sound, 50.0) end end )