-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
Vehicle mod: https://community.multitheftauto.com/index.php?p= ... ls&id=4215 Texture mods ( I don't know if this has to be removed ): https://community.multitheftauto.com/index.php?p= ... ls&id=4219 https://community.multitheftauto.com/index.php?p= ... ls&id=4218
-
Vehicle mod: https://community.multitheftauto.com/index.php?p= ... ls&id=4205 And some coca cola mod: https://community.multitheftauto.com/index.php?p= ... ls&id=4204
-
lockSkins = { [287] = true, [121] = true } -- sets the lock skins function createDeathPickup ( totalammo, killer, killerweapon, bodypart ) --when a player dies if ( lockSkins[getElementModel ( source )] ) and ( seat == 0 ) then local x, y, z = getElementPosition ( source ) --get the position of the person who died and define it as x, y and z local currentweapon = getPedWeapon ( source ) --get the current weapon of the dead person createPickup ( x, y, z, 2, currentweapon, 10000, totalammo ) else outputChatBox ( "*Você não pode entrar neste veículo.", source, 255, 00, 00) --info in chatbox end end addEventHandler ( "onPlayerWasted", getRootElement(), createDeathPickup ) --add an event handler for onPlayerWasted
-
https://wiki.multitheftauto.com/wiki/Ser ... kup_events
-
I'm afraid I don't understand, what do you mean by create a weapon that only a few skins can take? do you mean a pickup?
-
You can also use: unpack
-
-- Level = Weapon, Ammo. local weapons = { [ 1 ] = { 22, 500 }, [ 2 ] = { 24, 300 } }
-
1: You already output the new level, I think. 2: You may have something setting the element data each time the resource starts. 3: You could make a table of weapons, if the level is on the table, give the weapon.
-
That won't work. addEventHandler("onPlayerJoin", root, function ( ) setPlayerNametagText ( source, getPlayerName ( source ) .."[".. getPlayerWantedLevel ( source ) .."]" ) end ) function updateNametagWantedLevel ( ) for index, player in ipairs ( getElementsByType ( "player" ) ) do -- We loop through all online players. setPlayerNametagText ( player, getPlayerName ( player ) .."[".. getPlayerWantedLevel ( player ) .."]" ) -- We set their nametag text to their current name and wanted level. end end setTimer ( updateNametagWantedLevel, 3000, 0 ) -- We set a infinite timer of 3 seconds to update the nametag. Read the comments I've added.
-
addEventHandler("onPlayerJoin", root, function ( ) setPlayerNametagText ( source, getPlayerName ( source ) .."[".. getPlayerWantedLevel ( source ) .."]" ) end ) That script will add the wanted level when a player joins ( it'll be 0 for sure ), you can also add a timer to update it.
-
Vehicle mods: https://community.multitheftauto.com/index.php?p= ... ls&id=4195 https://community.multitheftauto.com/index.php?p= ... ls&id=4196 https://community.multitheftauto.com/index.php?p= ... ls&id=4197 Again skin marks shader example: https://community.multitheftauto.com/index.php?p= ... ls&id=4198
-
1: Si, con poner una URL valida como file path basta. 2: getTimerDetails se usa para obtener el tiempo restante de un timer.
-
function setVehColor ( playerSource ) local teamOfPlayer = getPlayerTeam ( playerSource ) if ( teamOfPlayer ) then local r, g, b = getTeamColor ( teamOfPlayer ) setVehicleColor ( source, r, g, b, r, g, b, r, g, b, r, g, b ) end end addEventHandler ( "onVehicleEnter", getRootElement ( ), setVehColor )
-
Everyone please calm down or I'll have to lock this topic.
-
guiGetText returns a text string, convert it with tonumber ( string ) and you have the object ID.
-
You want to get the ID from the gui-edit? if so, use guiGetText.
-
Press "F12" to take screenshots.
-
Click on these functions, it'll redirect you to the MTA wiki of that function.
-
Don't you read? you only have to change 1 to 0 at: g_base_col = createColCuboid ( 97.3376, 1800.0384, -32.0937, 250, 280, 120 ) g_root = getRootElement () --rocketOne = createMarker ( -2931.5136, 454.4492, 17.3671, "corona", 9.5, 255, 0, 0, 150 ) --test marker --rocketTwo = createMarker ( -2931.5932, 487.1994, 17.3671, "corona", 9.5, 255, 0, 0, 150 ) --test marker function hit ( pla, dim ) if getElementType ( pla ) == "player" then local vehicle = getPlayerOccupiedVehicle ( pla ) if vehicle or not vehicle then local skin = getPlayerSkin ( pla ) if ( skin == 287 or skin == 286 ) then setElementData ( pla, "inRestrictedArea", "true" ) triggerClientEvent ( pla, "destroyTrepassor", g_root, pla ) outputChatBox ( "***Restricted Area***", pla, 255, 0, 0 ) outputChatBox ( "* "..getClientName(pla).." has entered Restricted Area!", g_root, 255, 0, 0 ) setPlayerWantedLevel(pla,1) setTimer ( setPlayerWantedLevel, 60000, 1, pla, 1 ) -- Here. end end end end addEventHandler ( "onColShapeHit", g_base_col, hit )
-
Just change the '1' to '0'.
-
function Staffbaseport ( ) setElementPosition( localPlayer, 110.53934, 1104.70752, 13.60938 ) end addEventHandler ( "onClientGUIClick", button2, Staffbaseport )
-
Yes, but as far as I know, you want to reset it to 0.