-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
The server console won't print it. And the debugscript ( ingame ) did output the error.
-
It works here, post your meta.xml content.
-
Ah, I found the issue, you made a typo when writing "engineLoadTXD", you put "engineLoadTxd", copy my code and it should work.
-
function skins ( ) outputChatBox ( "SKIN REPLACEMENT LOADED" ) local modelId = 12 local txd = engineLoadTXD ( "model.txd" ) engineImportTXD ( txd, modelId ) local dff = engineLoadDFF ( "model.dff", modelId ) engineReplaceModel ( dff, modelId ) end addEventHandler ( "onClientResourceStart", resourceRoot, skins ) See what it outputs to chatbox.
-
That's because you forgot to fill the element at setElementInterior. Marker = createMarker ( 1060.0223388672, 1237.9868164063, 12.827476501465, 'arrow', 2, 0, 0, 255, 255 ) function Teleport ( player ) setElementInterior ( player, 5, 772.36291503906, -4.5911450386047, 1000.7290649414 ) end addEventHandler ( "onMarkerHit", Marker, Teleport )
-
function shout ( player, cmd, ... ) local accountname = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then local message = table.concat ( { ... }," " ) outputChatBox ( "SHOUTALL: ".. message, root, 205, 0, 0 ) else outputChatBox ( "You cannot use this command!", player, 255, 12, 15 ) end end addCommandHandler ( "SHOUTALL", shout )
-
function mapa ( ) rocket = createMarker ( 3412.8688964844, -1652.7664794922, 13.254596710205 ) setMarkerSize ( rocket, 5 ) function MarkerHit ( element ) if ( element == localPlayer and getElementType ( element ) == "player" and isPedInVehicle ( element ) ) then outputChatBox ( "#ff9900WARNING!", 255, 255, 255, true ) createProjectile ( localPlayer, 19, 3440.1625976563, -1543.6124267578, 32.850193023682, 1.0, localPlayer ) end end addEventHandler ( "onClientMarkerHit", rocket, MarkerHit ) end addEventHandler ( "onClientResourceStart", resourceRoot, mapa )
-
Any error(s) on debugscript?
-
You want to create a rocket missile to target the player that hit the marker? or a hydra flare?
-
'localPlayer' is defined by default by MTA.
-
local sprint = 100 addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) if ( getElementHealth ( localPlayer ) > 0 ) then sprint = 100 addEventHandler ( "onClientRender", root, onPlayerSprint ) end end ) addEventHandler ( "onClientPlayerSpawn", localPlayer, function ( ) sprint = 100 addEventHandler ( "onClientRender", root, onPlayerSprint ) end ) function onPlayerSprint ( ) if getControlState ( "sprint" ) then if ( sprint > 0 ) then sprint = ( sprint - 0.01 ) if ( sprint == 0 ) then toggleControl ( "sprint", false ) end end else if ( sprint < 100 ) then sprint = ( sprint + 0.01 ) if ( sprint == 100 ) then toggleControl ( "sprint", true ) end end end end
-
This code is from CSG server, have you got permission to use it?
-
Well, there's one for sounds like unreal tournament, you could edit it. https://community.multitheftauto.com/in ... ils&id=343
-
local blip = { } addEventHandler ( "onPlayerLogin", root, function ( ) if ( not isElement ( blip [ source ] ) ) then blip [ source ] = createBlipAttachedTo ( source ) end local theTeam = getPlayerTeam ( source ) if ( not theTeam ) then return end local r, g, b = getTeamColor ( theTeam ) setPlayerNametagColor ( source, r, g, b ) setBlipColor ( blip [ source ], r, g, b, 255 ) end ) addEventHandler ( "onPlayerQuit", root, function ( ) if isElement ( blip [ source ] ) then destroyElement ( blip [ source ] ) end end )
-
This isn't your script, is an script I sold to a server ( with another design ), which was later leaked by one of their staff members. So, please, stop selling things which aren't yours. Topic locked.
-
You're welcome.
-
That's wrong, "theCurrentAccount" will return an account element, you need the name, so: addEventHandler ( "onPlayerLogin", getRootElement ( ), function ( _, theCurrentAccount ) setPlayerName ( source, getAccountName ( theCurrentAccount ) ) end ) addEventHandler ( "onPlayerChangeNick", getRootElement ( ), function ( ) cancelEvent() end )
-
Try with the shader that shows the texture names. https://wiki.multitheftauto.com/wiki/Sh ... ture_names
-
You must set the 'visible' variable.
-
You left some stuff: [[ cancelEvent() Remove the brackets from there and here too: outputServerLog( "CHAT: " .. getPlayerName(source) .. ": " .. msg ) ]]
-
You can set their nick to their login name on login, then when they try to change nick, you don't let them.
-
I'll have to ask you to stay on topic please.
