
Anubhav
Members-
Posts
2,277 -
Joined
-
Last visited
Everything posted by Anubhav
-
Lol? I make my markers like this I change the value of Marker variable -.-. local Marker = createMarker(...) local Marker = createMarker(...) local Marker = createMarker(...) local Marker = createMarker(...)
-
I used resourceRoot at second arguement.
-
Why? So it gets leaked? I am not putting any scripts. I am not even using exports. Can't someone explain?
-
Fixed, thanks for telling me.
-
I have a script, which creates spawners. I've 2 same scripts only server.lua is diffrent. If I hit the marker it shows the GUI of firstOne. Why is that? Is it linked with it somehow/
-
There's nothing wrong in my code. If there is something wrong it will output it. I din't see givePlayerMoney function so :~. My code has nothing wrong .. Please try to improve english -.-
-
That won't work. You must add getTeamName for it.
-
Oh... Sorry, if I disturbed. I wasn't sure about this.
-
Atton, this won't work easily. There are many programmers who can try to edit some MTA code ( if they have the source code ) and make it not to destroy the key and store it with resource. Not sure if I am right, I am not expierenced in these things.
-
Awesome movie! Love it please keep making! LOVE IT LOVE IT SO AWESOME AND EMOTIONAL ENDING
-
setTimer(function() for k,tPlayer in ipairs(getElementsByType("player")) do if getElementData(tPlayer,'Group') == 'Army' then outputChatBox("Data: "..getElementData(tPlayer, 'Group')) givePlayerMoney(tPlayer, 4000) --- money Army end end end, 60000, 0)
-
local myVehi = createVehicle(...) setElementData(myVehi, "car-team", "yourTeamName") addEventHandler('onVehicleStartEnter', root, function(enteringPlayer, seat, jacked, door) if not getTeamName(getPlayerTeam(enteringPlayer)) == getElementData(source, "car-team") then cancelEvent() end end )
-
Not the same its diffrent one.
-
carsTable = {} addEvent ("carShopCarBuy", true) addEventHandler ("carShopCarBuy", getRootElement(), function(id, cost, name) if (getPlayerMoney (source) >= tonumber(cost)) then table.insert ( carsTable[source], id ) setAccountData (getPlayerAccount(source), "cu",toJSON (carsTable[source])) outputChatBox ("Press F3 To Spawn your Vehicle.", source, 0, 255, 0, true) takePlayerMoney (source, tonumber (cost)) else outputChatBox ("You don't have enough money!", source, 255, 0, 0, false) end end) addEventHandler ("onPlayerLogin",root, function ( ) local Account = getPlayerAccount(source) if (Account) then local nData = getAccountData ( Account, 'cu' ) if ( nData ) then nData = fromJSON(nData ) carsTable = nData triggerClientEvent ( source, 'movetable', source, nData ) end end end ) addEvent ('movetable', true) addEventHandler ( 'movetable', root, function ( nData ) for _,v in ipairs (nData) do local carName1 = getVehicleNameFromModel ( v ) local row = guiGridListAddRow (carGridList1) guiGridListSetItemText (carGridList1, row, 1, tostring(carName1), false, true) outputChatBox(tostring(carName1)) end end ) You've to save it for source too.
-
Why are you using onClientPreRender? It will make the server lag and may cause a crash if its not used properly. Try using onClientRender.
-
Show us the script, the function.
-
Thats a big issue. If you keep making hacks and keep giving here, whoever does that shouldn't get the bounty. Because how can he keep finding hacks so fast? He can only make them and get the money. They'll be pretty rich by this and as Markeloff told.
-
playerData = {} function set_data(player_element, data_key, data_value) -- export this function if type(player_element) == "nil" or type(data_key) == "nil" or type(data_value) == "nil" then return false end if not playerData[player_element] then playerData[player_element] = {} end playerData[player_element][data_key] = data_value return true end function get_data(player_element, data_key) -- export this function if type(player_element) == "nil" or type(data_key) == "nil" then return false end return playerData[player_element] and playerData[player_element][data_key] or false end function delete_data() -- you have to delete the data when the player quits playerData[source] = nil end addEventHandler('onClientPlayerQuit', root, delete_data)
-
Woah! I din't find any error, I outputted whatever it setted. Dude, whatever it setted was right, !! That means something is wrong in label coloring or something. I'll surely see it, and reply. Thanks for this TIP, this helped me alot!
-
What do you mean by checked or returned data? The data doesn't get setted, idk why. When I create the group I use same everything with everything defined! Here still it doesn't work. When I create the group it works PERFECT!
-
function FILEGet(what) if what then local file = FILEGetFile(what) if file then local data while not fileIsEOF(file) do if data then data = data..fileRead(file, 500) else data = fileRead(file, 500) end end fileClose(file) -- return data or false end end end
-
Any help please? Its very urgent!
-
missionMarker = createMarker ( -1305.2, -120.3, 13.4, "cylinder", 2, 0, 255, 255, 170 ) addEventHandler("onResourceStart", resourceRoot, function ( ) missionBlip = createBlipAttachedTo(missionMarker,53) outputChatBox( "[Plane Mission] Älä vielä mene lentokone missionille. se on kesken", source, 0, 255, 255 ) end ) addEventHandler("onMarkerHit", missionMarker, function ( hitElement ) if (getElementType ( hitElement ) == 'player' ) then local plane = createVehicle ( 519, -1654, -162, 14, 0, 0, -45 ) warpPedIntoVehicle ( hitElement, plane ) outputChatBox( "[Plane Mission] Lennä punaiselle lipulle.", hitElement, 0, 255, 255 ) finalMarker = createMarker ( 338, 2505, 16, "checkpoint", 6, 255, 255, 0, 170 ) finalBlip = createBlipAttachedTo(finalMarker,19) end end ) addEventHandler("onMarkerHit", finalMarker, function ( hitElement ) if (getElementType ( hitElement ) == 'player' ) then destroyElement( finalMarker ) destroyElement( finalBlip ) end end )
-
missionMarker = createMarker ( -1305.2, -120.3, 13.4, "cylinder", 2, 0, 255, 255, 170 ) addEventHandler("onResourceStart", resourceRoot, function ( ) missionBlip = createBlipAttachedTo(missionMarker,53) outputChatBox( "[Plane Mission] Älä vielä mene lentokone missionille. se on kesken", source, 0, 255, 255 ) end ) addEventHandler("onMarkerHit", missionMarker, function ( hitElement ) if (getElementType ( hitElement ) == 'player' ) then local plane = createVehicle ( 519, -1654, -162, 14, 0, 0, -45 ) warpPedIntoVehicle ( hitElement, plane ) outputChatBox( "[Plane Mission] Lennä punaiselle lipulle.", hitElement, 0, 255, 255 ) finalMarker = createMarker ( 338, 2505, 16, "checkpoint", 6, 255, 255, 0, 170 ) finalBlip = createBlipAttachedTo(finalMarker,19) end end ) addEventHandler("onMarkerHit", finalMarker, function ( hitElement ) if (getElementType ( hitElement ) == 'player' ) then if (getElementType ( hitElement ) == 'vehicle' ) then destroyElement( finalMarker ) destroyElement( finalBlip ) end end end )