Anubhav
Members-
Posts
2,277 -
Joined
-
Last visited
Everything posted by Anubhav
-
As he said. You'll need: downloadFile or fetchRemote to download files and those things.
-
function startBlips ( button ) if ( button == spawnCar ) then local markerTableData = destinationCoords[math.random ( #destinationCoords )] local x = markerTableData[1] local y = markerTableData[2] local z = markerTableData[3] startMarker = createMarker ( x, y, z, "cylinder", 3, 255, 255, 51 ) startBlip = createBlipAttachedTo ( startMarker, 51 ) setElementVisibleTo( startBlip, root, false ) setElementVisibleTo( startBlip, source, true ) end end addEventHandler ("onClientPlayerVehicleEnter", getRootElement (), startBlips )
-
No you can't afaik. Maybe you can but not realy sure.
-
addEventHandler ( "onResourceStart", getResourceRootElement( getThisResource () ), function () connection = dbConnect( "mysql", "dbname=memo;host=127.0.0.1;port=3306;", "root", pass )
-
You can try editing interiors resource if possible else you cannot.
-
Hello baysapo mein. Yaha pa koy kuch bat nahi karta kya? isko mein chat and fun banata hu. --- kuck rules hein gande bath nahi bolna ache pash ana or mta forum rules bhi. MAZA KARO! danyawad
-
How don't you know the ID? You can replace it with any vehicle ( dff and txd ) if its a vehicles else if its weapon replace it with any weapon ID u want.
-
function onPlayerTargeted ( loss, thePlayer ) local object = getElementModel ( source ) if object == 18450 then local vehicle = getPedOccupiedVehicle ( thePlayer ) blowVehicle ( vehicle ) end end addEventHandler ( "onClientObjectDamage", root, onPlayerTargeted )
-
function enterClubConfirmed( ) oldBalance = exports [ "bank-reloaded" ]:getBankAccountBalance ( "stolka" ) if not oldBalance then exports ["bank-reloaded"]:setBankAccountBalance( "stolka", 0) oldBalance = exports [ "bank-reloaded"]:getBankAccountBalance( "stolka" ) end outputChatBox(tostring(oldBalance)) exports [ "bank-reloaded" ]:setBankAccountBalance ( bankAccount, tonumber( oldBalance ) + 120 ) fadeCamera( player, true, 1.5 ) setElementDimension( player, 2 ) setElementInterior( player, 2 ) end addEvent( "onPlayerClubConfirm", true ) addEventHandler( "onPlayerClubConfirm", getRootElement(), enterClubConfirmed )
-
addCommandHandler ( "staffchat", fuction ( thePlayer, _, ... ) if ( isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), "staff" ) ) then for i, p in ipairs ( getElementsByType ( "player" ) ) do if ( isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(p)) "staff" ) ) then outputChatBox ( "[staff] ".. getPlayerName ( p ) ..": ".. table.concat({...}, " "), p, 0, 0, 120 ) end end end end ) If your nick wouldn't be acc could create problems.
-
I fixed it myself thanks for help.
-
Still same error. I meant that when I use that function it gives error. The ipair and node thingy gets boolean.
-
setTimer( function() for k,v in ipairs(getElementsByType("player")) do if getTeamName(getPlayerTeam(v)) == "Staff" then setElementHealth(v, getElementHealth(v)+10) end end end, 1000, 0)
-
function getResourceMaps(resource) local scripts = {} local resourceName = tostring(resource) local theMeta = xmlLoadFile(":"..resourceName.."/meta.xml") for i, node in ipairs (xmlNodeGetChildren(theMeta)) do if (xmlNodeGetName(node) == "map") then local script = xmlNodeGetAttribute(node, "src") if (script) then table.insert(scripts, script) end end end return scripts end xmlNodeGetChildren and ipairs got boolean all time. The resourceName is "play".
-
Maybe yes, maybe no. Depends gamemode too%%
-
function createTeamsOnStart () civilTeam = createTeam ( "Civilians", 0, 153, 0 ) criminalTeam = createTeam ( "Criminals", 255, 0, 0 ) end addEventHandler("onResourceStart", resourceRoot, createTeamsOnStart ) function becomeCivil ( thePlayer ) setPlayerTeam ( thePlayer, getTeamFromName(civilTeam) ) outputChatBox ("You are now a Civilian!",thePlayer,0, 153, 0 ) if ( civilTeam ) then toggleControl (thePlayer, "fire", false ) toggleControl (thePlayer, "aim_weapon", false ) else toggleControl (thePlayer, "fire", true ) toggleControl (thePlayer, "aim_weapon", true ) end end function becomeCriminal ( thePlayer ) setPlayerTeam ( thePlayer, getTeamFromName(criminalTeam) ) outputChatBox ("You are now a Criminal!", thePlayer, 255, 0, 0 ) if ( getTeamFriendlyFire ( criminalTeam ) == false ) then setTeamFriendlyFire (getTeamFromName(criminalTeam), true) end end addEventHandler("onPlayerDamage", root, function(a) if getTeamName(getPlayerTeam(a)) == "Criminals" and getTeamName(getPlayerTeam(source)) == "Civilians" then cancelEvent() end end ) function checkRestrictions( ) if getTeamName(getPlayerTeam(source) == "Criminals" then toggleControl ( source, "fire", true ) toggleControl ( source, "aim_weapon", true ) end end addEventHandler ( "onPlayerWeaponSwitch", getRootElement (), checkRestrictions ) addCommandHandler( "criminal", becomeCriminal ) addCommandHandler( "quitjob", becomeCivil )
-
1. No, the first one downloads first. 2. I don't know. 3. Yes.
-
local replaceModel = 1 function infmod() if getElementData(source,"state") ~= "alive" then if replaceModel == 1 then replaceModel = 2 txd = engineLoadTXD("infernus.txd", 411) engineImportTXD(txd, 411) dff = engineLoadDFF("infernus.dff", 411) engineReplaceModel(dff, 411) elseif replaceModel == 2 then replaceModel = 1 engineRestoreModel ( 411 ) end end end addEvent ( "restoreClientModel", true ) addEventHandler ( "restoreClientModel", getRootElement(), infmod ) addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), infmod) bindKey ("F6", "down", infmod )
-
Keep increasing then number then try.