If its only about these 2 files, why don't you just put them in your meta so they get auto downloaded?
You can still create a function to enable/disable them or a function to delete them after they were imported if its about protection.
As far as I know client side marker hit event only supports player elements.
If you do it server side you will have to check if the hitElement is a player or a vehicle first.
Try getElementType.
Maybe you should use "isElementWithinMarker" and a check every xx amount of time to check if the player is within that marker.
Because onMarkerHit, as you said, is only triggered when u first hit it. After that you are inside of it.
That looks even more weird
Shouldn't it be like:
if theFile == ":/test/cars/infernus.txd" then
local theTXD = engineLoadTXD ( theFile )
engineImportTXD ( theTXD, 411 )
elseif theFile == ":/test/cars/infernus.dff" then
local theDFF = engineLoadDFF ( theFile, 411 )
engineReplaceModel ( theDFF, 411)
end
Exactly, but personally, I wouldn't buy anything that has compiled parts.
You never know what it actually does.
But sadly there are too many people especially in this MTA Community doing this kinda reselling or sharing stuff.
I thought about making it public so people can learn from it since I kept it simple, but I was told not to.
So everything I can do is selling it so in case of someone reselling/leaking it I'm at least not totally screwed.
Bonsai
Hey Peeps,
I created a some kind of Arena Script that allows you to have multiple arenas on one server, as you have probably seen on certain servers out there.
Since I was just doing this for fun and not being interested in having my own server and community,
I want to share it so people who are looking for something like this can use and/or learn from it.
I think I managed to fix every major bug, so there shouldn't be any problems.
As for all big size scripts there can and probably will be smaller bugs, such as resolution problems, but nothing too bad.
You will get the uncompiled script so you can basically modify anything you want.
The script is supposed to support race maps only. You can create as many arenas as you want having all different kind of race maps you can think of.
If you have any questions post them here so anyone can see my respond,
if you are interested send me a private message telling me how much you are willing to pay for it.
Don't be afraid.
If you wanna check out the script in action check send me a pm so I can give you the IP of a test server.
This offer includes the complete uncompiled script and one map for every default arena, just so you can see how that works.
Please understand that I can't offer any further support.
Bonsai
As far as I know you can't destroy a players ped. Dead players bodies only disappear after they respawned.
So maybe you could just change the alpha of the player and disable its collisions.
Else you would have to spawn the player or change its position.
Ahh, now I get it.
You also have to change the x,y of the image, since its always the upper left corner, not the center.
So try to use something like this:
dxDrawMaterialLine3D( x, y-(v/2), z, x, y+v, z , material, v, TextColor, x, y, z-1)
That function is not existing as long as you didn't implement it.
function isPlayerInTeam( thePlayer, teamName )
local pTeam = getPlayerTeam( thePlayer )
local fTeam = getTeamFromName( teamName )
if ( pTeam ) and ( fTeam ) then
if ( pTeam == fTeam ) then
return true
end
end
end
You could also use getPlayerTeam and compare it to medic team.
Race resource has a nextmap command.
For buy map command you just have to copy that function and attach it to another command handler and maybe put some check if the player did buy a map already...