-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
I don't want to sound rude, but that's an old excuse to get someone to tell you how to do it, then you can simply steal other's work. But anyway, there are no decompilers that can decompile 100% of the code without fail (as far as I know).
-
local markers = {} local blips = {} function consoleCreateMarker ( playerSource ) if ( playerSource ) then if ( hasObjectPermissionTo ( playerSource , "function.kickPlayer", true ) ) then local x, y, z = getElementPosition ( playerSource ) markers[playerSource] = createMarker ( x, y, z, "checkpoint", 2, 255, 0, 0, 255 ) blips[playerSource] = createBlipAttachedTo(markers[playerSource], 53) end end end addCommandHandler ( "createmarker", consoleCreateMarker ) function consoleDestroyMarker ( playerSource ) if ( isElement(markers[playerSource]) and isElement(blips[playerSource]) ) then destroyElement(markers[playerSource]) destroyElement(blips[playerSource]) markers[playerSource] = nil blips[playerSource] = nil end end addCommandHandler ( "destroymarker", consoleDestroyMarker )
-
Me pregunto, para que esta el evento: onPlayerPickUpRacePickup si no lo usan? -- server side: addEventHandler("onPlayerPickUpRacePickup",root, function (pickupID, pickupType, vehicleModel) if (pickupType == "vehiclechange") then local theVehicle = getPedOccupiedVehicle(source) addVehicleUpgrade(theVehicle, 1075) end end)
-
First, this should go in the "Scripting" section: viewforum.php?f=91 Second, how can we help you if you don't post the code? Third, do what the second says.
-
Hmmm, I think I pick this answer .
-
local markers = {} local blips = {} function consoleCreateMarker ( playerSource ) if ( playerSource ) then local x, y, z = getElementPosition ( playerSource ) markers[playerSource] = createMarker ( x, y, z, "checkpoint", 2, 255, 0, 0, 255 ) blips[playerSource] = createBlipAttachedTo(markers[playerSource], 53) end end addCommandHandler ( "createmarker", consoleCreateMarker ) function consoleDestroyMarker ( playerSource ) if ( isElement(markers[playerSource]) and isElement(blips[playerSource]) ) then destroyElement(markers[playerSource]) destroyElement(blips[playerSource]) markers[playerSource] = nil blips[playerSource] = nil end end addCommandHandler ( "destroymarker", consoleDestroyMarker ) Should work. P.S: This should go in the "Scripting" section .
-
What can I say? that's the problem of using scripts not made by yourself. Really, you should make something by scratch instead of using someone else work.
-
You're welcome .
-
Please don't double post and wait for an answer.
-
I said, post the whole code.
-
You really should try to learn more english, because many people has explained your error many times and you didn't understood them.
-
There you are using two different variables: playerSource and source, also is that your full script? if so, is really wrong.
-
You had put "Win" (UPPER CASE 'W') in the EVENT HANDLER, and in the function you put win (LOWER CASE 'w').
-
exports.scoreboard:scoreboardAddColumn("EXP") exports.scoreboard:scoreboardAddColumn("Level") function win(ammo, killer, weapon, bodypart) local H = getElementData(killer, "EXP") local S = getElementData(killer, "Level") local killer1 = getPlayerName(killer) local noob = getPlayerName(source) if killer and killer ~=source then setElementData(killer, "EXP", tonumber(H)+1) if tonumber(H) == 10 then setElementData(killer, "Level", "Lvl 1") elseif tonumber(H) == 20 then setElementData(killer, "Level", "Lvl 2") elseif tonumber(H) == 30 then setElementData(killer, "Level", "Lvl 3") elseif tonumber(H) == 40 then setElementData(killer, "Level", "Lvl 4") elseif tonumber(H) == 50 then setElementData(killer, "Level", "Lvl 5") elseif tonumber(H) == 60 then setElementData(killer, "Level", "Lvl 6") end outputChatBox(killer1 .. "Killed " .. noob .. " and gained +1 EXP", getRootElement(), 255, 255, 0, false) end end addEventHandler( "onPlayerWasted", getRootElement(), win)
-
Dev-Point, that was not his question. local myMarker = getElementByID("My Marker ID in A map File") -- We get the marker element from a ID in the map file. if (isElement(myMarker)) then -- We check if the marker exists. addEventHandler( "onMarkerHit", myMarker, MarkerHit ) -- attach onMarkerHit event to MarkerHit function end function MarkerHit( hitElement, matchingDimension ) -- define MarkerHit function for the handler local elementType = getElementType( hitElement ) -- get the hit element's type outputChatBox( elementType.." inside myMarker", getRootElement(), 255, 255, 0 ) -- attach the element's type with the text, and output it end
-
Show us your code.
-
https://wiki.multitheftauto.com/wiki/RedirectPlayer
-
You're welcome.
-
That's called the spyder bug (at least I call it like that), it happens some times when you switch from CJ to normal skins. Restart MTA, usually fixes it.
-
function aAction ( type, action, admin, player, data, more ) if ( aLogMessages[type] ) then function aStripString ( string ) string = tostring ( string ) string = string.gsub ( string, "$admin", getPlayerName ( admin ):gsub("#%x%x%x%x%x%x","") ) string = string.gsub ( string, "$by_admin_4all", isAnonAdmin4All( admin ) and "" or " by " .. getPlayerName ( admin ):gsub("#%x%x%x%x%x%x","") ) string = string.gsub ( string, "$by_admin_4plr", isAnonAdmin4Victim( admin ) and "" or " by " .. getPlayerName ( admin ):gsub("#%x%x%x%x%x%x","") ) string = string.gsub ( string, "$data2", more or "" ) if ( player ) then string = string.gsub ( string, "$player", getPlayerName ( player ) ) string = string:gsub("#%x%x%x%x%x%x","") end return tostring ( string.gsub ( string, "$data", data or "" ) ) end local node = aLogMessages[type][action] if ( node ) then local r, g, b = node["r"], node["g"], node["b"] if ( node["all"] ) then outputChatBox ( aStripString ( node["all"] ), _root, r, g, b ) end if ( node["admin"] ) and ( admin ~= player ) then outputChatBox ( aStripString ( node["admin"] ), admin, r, g, b ) end if ( node["player"] ) then outputChatBox ( aStripString ( node["player"] ), player, r, g, b ) end if ( node["log"] ) then outputServerLog ( aStripString ( node["log"] ) ) end end end end Fixed.
-
No imperio, el usara varias de las funciones, porque los textos server-side no funcionan como las GUI labels, dxDrawText, etc, etc.
-
Hi redb4ll. If you want to learn how to add resources/admin accounts, you must learn the Server Manual here: https://wiki.multitheftauto.com/wiki/Ser ... ng_started If you want more resources for your server and you don't know how to make them by yourself, then you can search on the MTA Community Center, there are many resources uploaded by various different community members. https://community.multitheftauto.com/index.php?p=resources
-
You want to replace the model texture/model? If so, you can use the scripting Engine functions to replace them: https://wiki.multitheftauto.com/wiki/Cli ... _functions
-
Jajaja, empieza todo que parece algo XXX y luego es un osito.
