-
Posts
521 -
Joined
-
Last visited
Everything posted by Axel
-
Attempt To Index Local 'result' a nil value - HELP!
Axel replied to micheal1230's topic in Scripting
The error is not from the script. You must add to the sql the globalsupplies is settings. -
I suggest you to take a look in all uncompiled comunity scripts. Modify them to fit your needs and start making your own inspiring from there. You got wiki to help you.. It's not that hard
-
firstMarker = createMarker ( 2055.4, -1775.08, 12.6, "cylinder" ,2, 249, 19, 75, 190 ) teamCriminal = createTeam( "Criminal", 249, 19, 75) local random = math.random(600,1000) local message = "You have robbed the house and got "..random.."$" function onMarkersHit ( thePlayer ) if source == firstMarker then setElementModel ( thePlayer, 115 ) setPlayerTeam ( thePlayer, teamCriminal ) setPlayerNametagColor ( thePlayer, teamCriminal ) outputChatBox ( "You are now Robber.", thePlayer ) secondMarker = createMarker ( 2144.3,-1663.7,14.6,"cylinder",2, 249, 19, 75, 190 ) blip1 = createBlipAttachedTo(secondMarker,32) end if source == secondMarker then destroyElement ( secondMarker ) destroyElement ( blip1 ) givePlayerMoney ( thePlayer, random ) outputChatBox ( message, thePlayer ) thirdMarker = createMarker(2146.3,-1470.4,25.1,"cylinder",2, 249, 19, 75, 190) blip2 = createBlipAttachedTo(thirdMarker,32) end if source == thirdMarker then destroyElement ( thirdMarker ) destroyElement ( blip2 ) givePlayerMoney ( thePlayer, random ) outputChatBox ( message, thePlayer ) end end addEventHandler ( "onMarkerHit", getRootElement(), onMarkersHit )
-
Try /openports on the console.
-
Terminati cu posturile inutile si aparte de la subiect.
-
As far as i know Samer woldn't do such a thing.
-
function carSpawn () local acc = getPlayerAccount(source) local x,y,z = getElementPosition(source) local theCar = getAccountData(Acc,"theCar") veh = createVehicle(tostring(theCar),x,y,z) warpPedIntoVehicle(source,veh) end addCommandHandler( "spawnMyCar", carSpawn)
-
maybe here's the problem addEventHandler ( "UpdateLocation", localPlayer, updateLocations ) shouldn't it be like this? addEventHandler ( "UpdateLocation", getRootElement(), updateLocations )
-
local vehs = getElementsByType("vehicle") for i,v in ipairs (vehs) do local carId = getVehicleNameFromModel(v) local row = guiGridListAddRow(yourList) -- change yourList to your list's name.. guiGridListSetItemText (yourList, row, 1, carID, false, true) guiGridListSetItemText (yourList, row, 2, v, false, true) end
-
maybe there is a getElementData(thePlayer,"invincible") that sets it's alpha to 0?
-
I sugest using onMarkerHit on root then if the source == yourmarkername then continue it.., usualy when u got alot of similar elements that's easier (atleast for me..)
-
Are you logged in? /login name pass ?
-
How can i remove that label wich says "MTA:SA 1.3" ?
-
If you got vG then: /setfactionleader [Name] 1 (/commands for a list of player commands, and /ah for a list of admin commands)
-
Well this was a strange question though, but what i mean is: Create a account with a huge password, use getAccountData and setAccountData to get data from it. I think it will work, i just needed some advice. (Note: I'm doing this just for curiosity)
-
Is it possible to make a account like a database? For exemple addAccount("paynsprays","youwillneverknowit") and use it onResourceStart and modify the data in it? Like a account that none uses, and is used for storing data?
-
That's becouse obtenerNombre is not specified there, you have to insert obtenerNombre = getPlayerName( source ) there too. Copy again my code.
-
This should work: function obtenerName() obtenerNombre = getPlayerName( source ) outputChatBox(" #00FF00 "..obtenerNombre.." , Tu nombre se te cambiara por tu nombre de cuenta cuando te desconectes te regresaremos tu nombre ", source, 255, 0, 0, true) end addEventHandler("onPlayerJoin", getRootElement(), obtenerName) function setearName() accountName = getAccountName( getPlayerAccount ( source ) ) obtenerNombre = getPlayerName( source ) outputChatBox(" #00FF00"..obtenerNombre.." , Ahora tu Nombre se cambio al Nombre de tu cuenta ("..accountName..") ", source, 255, 0, 0, true) setPlayerName( source, accountName ) end addEventHandler("onPlayerLogin", getRootElement(), setearName) function debolberName() setPlayerName( source, obtenerNombre ) end addEventHandler("onPlayerQuit", getRootElement(), debolberName) (tested)
-
Check it again, that might work.
-
You must specify the id in the load of txd files too: function loadmodels() local txd = engineLoadTXD ( "files/bugatti.txd", 541) engineImportTXD ( txd, 541 ) local dff = engineLoadDFF ( "files/bugatti.dff", 541 ) engineReplaceModel ( dff, 541 ) local txd = engineLoadTXD ( "files/globemaster.txd",592) engineImportTXD ( txd, 592 ) local dff = engineLoadDFF ( "files/globemaster.dff", 592 ) engineReplaceModel ( dff, 592 ) local txd = engineLoadTXD ( "files/dodge.txd",429) engineImportTXD ( txd, 429 ) local dff = engineLoadDFF ( "files/dodge.dff", 429 ) engineReplaceModel ( dff, 429 ) local txd = engineLoadTXD ( "files/pontiac.txd",603) engineImportTXD ( txd, 603 ) local dff = engineLoadDFF ( "files/pontiac.dff", 603 ) engineReplaceModel ( dff, 603 ) local txd = engineLoadTXD ( "files/honda.txd",522 ) engineImportTXD ( txd, 522 ) local dff = engineLoadDFF ( "files/honda.dff", 522 ) engineReplaceModel ( dff, 522 ) local txd = engineLoadTXD ( "files/corvette.txd",411 ) engineImportTXD ( txd, 411 ) local dff = engineLoadDFF ( "files/corvette.dff", 411 ) engineReplaceModel ( dff, 411 ) local txd = engineLoadTXD ( "files/desmond.txd", 79) engineImportTXD ( txd, 79 ) local dff = engineLoadDFF ( "files/desmond.dff", 79 ) engineReplaceModel ( dff, 79 ) local txd = engineLoadTXD ( "files/claire.txd",91 ) engineImportTXD ( txd, 91 ) local dff = engineLoadDFF ( "files/claire.dff", 91 ) engineReplaceModel ( dff, 91 ) local txd = engineLoadTXD ( "files/osama.txd" ) engineImportTXD ( txd, 153 ) local dff = engineLoadDFF ( "files/osama.dff", 153 ) engineReplaceModel ( dff, 153 ) local txd = engineLoadTXD ( "files/vader.txd",105 ) engineImportTXD ( txd, 105 ) local dff = engineLoadDFF ( "files/vader.dff", 105 ) engineReplaceModel ( dff, 105 ) local txd = engineLoadTXD ( "files/girl.txd",172 ) engineImportTXD ( txd, 172 ) local dff = engineLoadDFF ( "files/girl.dff", 172 ) engineReplaceModel ( dff, 172 ) local txd = engineLoadTXD ( "files/katana.txd",339 ) engineImportTXD ( txd, 339 ) local dff = engineLoadDFF ( "files/katana.dff", 339 ) engineReplaceModel ( dff, 339 ) end addEventHandler("onClientResourceStart", getRootElement(getThisResource()), loadmodels)
-
I think this will work: for i,v in ipairs getElementsByType("ped") do if (getElementModel(v) == 68) then setPedOnFire(v,true) end end Next time use [ lua ] [ /lua ] tags.
-
Ye, here: function mod() -- clientside txd = engineLoadTXD("name.txd", 425 ) -- name.txd = txd file, 425 = car id engineImportTXD(dff, 425) dff = engineLoadDFF("name.dff", 425 ) -- name.dff = dff file, 425 = car id engineReplaceModel(dff, 425) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), mod)