-
Posts
877 -
Joined
-
Last visited
Everything posted by denny199
-
/devmap zombie_pentagon
-
Allright, testing it now: Thanks, it's working.
-
I mean with; "isn't only for the client" That everyone his/her gamespeed is set to for example: 0,3. And how should I 'container' it? like this?: hittype = getElementType( hitElement ) if (hittype == player ) then
-
where's the function? where is theVehicle defined? edit: Or do this? if (getVehicleType(theVehicle) == "Bike" or getVehicleType(theVehicle) == "Boat" or getVehicleType(theVehicle) == "BMX" or getVehicleType(theVehicle) == "Quad") then outputChatBox ("works!! fap fap fap") end And then * fap fap fap fap fap *
-
Hey there, I was just scripting arround for a map, but then I've found out that setGameSpeed isn't only for the client on client-side my code: marker1 = createMarker ( 4931.61621, -2618.78564, 7.33527, "cylinder", 1.5, 255, 255, 0, 0 ) container1 = createObject ( 2934,4920.2998046875,-2569.6999511719,23,0,0,0 ) function container () moveObject(container1, 1000, 4920.299, -2569.699, 7.5, 0, 0, 0 ) setTimer (createExplosion, 1000,4, 4920.299, -2569.699, 7.5, 4 ) setGameSpeed(0.4) setTimer ( setGameSpeed, 2000, 1, 1) end addEventHandler ( "onClientMarkerHit", marker1, container ) meta.xml <meta> <script src="client.lua" type="client"></script> </meta> Regards, Danny
-
I think you've got some wrong calculations carHealth = getElementHealth(vehicle)/10; must be carHealth = getElementHealth(vehicle)/10 - 10 Will return when burning 0.7867876..blabla but the bar isn't synced then. Just lol arround with it.
-
It says Resource not found, but the resource is there
denny199 replied to stormchaser206's topic in Scripting
[2012-10-20 12:17:42] ERROR: Couldn't find script gui.lua for resource testmode [2012-10-20 12:17:42] Loading of resource 'testmode' failed -
Did you started the resource? f8>typ: start resourcename
-
Do you have your'e own font? or do you want to import a mta's default font?
-
In: your'e installedmtafolder/server/mods/deatmatch/resources
-
That wil not work xiti, dxDrawText needs the eventhandler onClientRender.
-
Well, are you using a gangsystem or something? or do you mean on name like [DenR]
-
what do you mean with: "group" ?
-
It's a shader: take a look here: https://wiki.multitheftauto.com/wiki/Shader_examples
-
That code is totally wrong. Maybe is this usefull: https://community.multitheftauto.com/index.php?p=resources&s=details&id=3090
-
use onVehicleStartEnter instead of onVehicleEnter so:
-
Techial chek the function abc, it's [theplayer] and by getPlayerAccount [thePlayer] Use mine code, it's tested.
-
I've edited the script. edit: here: function idk () local X, Y, Z = 0, 3, 4 abcvehicle = createVehicle ( 432, X, Y, Z + 10 ) addEventHandler("onVehicleEnter", abcvehicle, abc ) end addEventHandler ( "onResourceStart", resourceRoot, idk ) function abc ( thePlayer, seat, jacked ) local accname = getAccountName ( getPlayerAccount ( thePlayer ) ) if accname == "aliarman" then outputChatBox ("Welcome to your Car", thePlayer, 255,0,0,true) else cancelEvent() end end
-
addEventHandler("onVehicleEnter", getRootElement(), abc ) getRootElement() = for all elements, use the vehicle element. so: function idk () local X, Y, Z = 0, 3, 4 abcvehicle = createVehicle ( 432, X, Y, Z + 10 ) addEventHandler("onVehicleEnter", abcvehicle, abc ) end addEventHandler ( "onResourceStart", resourceRoot, idk ) function abc ( thePlayer, seat, jacked ) local accname = getAccountName ( getPlayerAccount ( thePlayer ) ) if accname == "denny19" then outputChatBox ("Welcome to your Car", thePlayer, 255,0,0,true) else cancelEvent() end end Tested
-
http://www.fear.fm/radio/player
-
just edit function startImageDownload( playerToReceive ) edit: function startImageDownload( playerToReceive ) fetchRemote ( "http://www.example.com/image.jpg", myCallback, "", false, getRootElement() ) end addEventHandkler ( "onResourceStart", resourceRoot, startImageDownload) function myCallback( responseData, errno, playerToReceive ) if errno == 0 then triggerClientEvent( getRootElement(), "onClientGotImage", resourceRoot, responseData ) end end
-
YES IT CAN fetchRemote https://wiki.multitheftauto.com/wiki/FetchRemote
-
Thanks
-
Hey there, I'm busy with my new project, but now I'm stuck with one thing. I need to chek something if it's an number or not. Is there a function out there that will do it? Or do I need to work with string.find ? Or maybe a table with only numbers and then loop through it? Regards -Denny
