
DjSt3rios
Members-
Posts
113 -
Joined
-
Last visited
Everything posted by DjSt3rios
-
It does not work
-
With this code, the script doesnt work at all, i tried using debug, and its not working at all. I also tried to fix it without luck. EDIT: I made it working, but still no luck
-
Hello, I have a problem with a script im working on. I have this code: addEventHandler("onVehicleEnter", getRootElement(), function(thePlayer, seat, jacked) local currentElement = createObject(360, 0.0, 0.0, 0.0) attachElements(currentElement, source, 0.0, 1.8, 0.0, 0.0, 0.0, 90.0) end) so it attach the element to the player(or to the vehicle, not 100% sure) Anyway, and i tried this: function removeobject ( thePlayer, seat, jacked ) occupiedVehicle = getPedOccupiedVehicle( thePlayer ) local attached = getElementAttachedTo ( thePlayer ) destroyElement ( attached ) end addEventHandler ( "onVehicleExit", getRootElement(), removeobject ) addEventHandler ("onVehicleExplode", getRootElement(), removeobject) Server side both of them, but it does not delete the element that it is attached, as you saw in the first function. I also tried to use where it says local attached = getElementAttachedTo ( thePlayer ) make it local attached = getElementAttachedTo ( occupiedVehicle ) but still it is not working. Maybe any idea how to fix it? Thanks.
-
Ok i finally made it quite well, not perfect though but its enough good. Thanks for your help. Edit: oh i didnt see ur previous message buddy, i will reply soon with new answers.
-
Still no luck Thats my current code: local x, y, z = getElementPosition(occupiedVehicle) local vx, vy, vz = getElementVelocity(occupiedVehicle) local rotx, roty, rotz = getElementRotation(occupiedVehicle) createProjectile(getLocalPlayer(), 19, x, y+2, z+2, 1.0, nil, rotx, roty, rotz, vx, vy, vz) I also tried to change 'nil' which is the target(althought i think it only works with ID 20, which is heat seeking), to rotz, but nothing changed
-
Anyone?
-
Hello, I have a problem. Im making a map, and i used this code: local occupiedVehicle = getPedOccupiedVehicle(getLocalPlayer()) local x, y, z = getElementPosition(occupiedVehicle) local vx, vy, vz = getElementVelocity(occupiedVehicle) local rotx, roty, rotz = getElementRotation(occupiedVehicle) createProjectile(getLocalPlayer(), 19, x, y, z, 500, nil, 0, 0, rotz, vx, vy, vz) But its not going as i want... i want to make it read the rotation of the car, and make the bullet go straight where the car looks. Also its not synchronised, in my friend's screen it goes to opposite direction any help?
-
Its kinda complicated for me I dont really get which function makes the NPC to do the moves that the player did
-
Hmm doesnt really look bad, but i want to use it in race, in a specific map, and its kinda confusing, isnt there any code so i can record it myself easily and put it in my map?
-
Hello, I was wondering if its possible to make an npc drive, and follow a player, or record a destination with a car, and make the npc drive the same destination.
-
Edit: Sorry im having problem again I have 2 car mods in 1 Map, but textures are not working. I fixed one texture of 1 car, and the texture of the other car stopped working properly. Can someone help?
-
So i just add the function, and then what i have to do? I have these lines: local r,g,b=getPlayerNametagColor(player) dxDrawText (getPlayerName(player), sx, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, "default-bold", "center", "bottom", false, false, false )
-
Nothing names are white...
-
What exactly do you mean? how could i do that?
-
Oh no this destroys all my dream anyway thanks for the help!
-
Doesnt work. No errors.
-
Thanks works. But one question please, how would i import a paintjob mod? I tried to make it like this: txd3 = engineLoadTXD ( "flash1.txd" ) engineImportTXD ( txd3, 565 ) But it doesnt work. ANy help?
-
Full meta file: <meta> <script src="server.lua" type="server" /> <file src="flash.txd" /> <file src="flash.dff" /> <file src="sabre.txd" /> <file src="sabre.dff" /> <script src="client.lua" type="client" /> <info gamemodes="race" type="map" name="[DM] Fast and Furious Map" author="DS" version="1.0.0" /> <map src="[DM] Fast and Furious.map" dimension="0" /> <settings> <setting name="#minplayers" value="[ 0 ]" /> <setting name="#maxplayers" value="[ 128 ]" /> <setting name="#gravity" value="[ 0.008000 ]" /> <setting name="#weather" value="[ 0 ]" /> <setting name="#time" value="12:0" /> <setting name="#locked_time" value="[ false ]" /> <setting name="#waveheight" value="[ 0 ]" /> <setting name="#gamespeed" value="[ 1 ]" /> </settings> </meta>
-
Oh no Why do they have the functions on the wiki then? At leas they could write that these functions are not working yet Thanks anyway.
-
Hello, i made a file named client.lua and includes this: function installMods() txd = engineLoadTXD ( "sabre.txd" ) txd2 = engineLoadTXD ( "flash.txd" ) engineImportTXD ( txd, 475 ) engineImportTXD ( txd2, 565 ) dff = engineLoadDFF ( "sabre.dff", 475 ) dff2 = engineLoadDFF ( "flash.dff", 565 ) engineReplaceModel ( dff, 475 ) engineReplaceModel ( dff2, 565 ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), installMods ) Now, in meta.xml i have this: <file src="flash.txd" /> <file src="flash.dff" /> <file src="sabre.txd" /> <file src="sabre.dff" /> <script src="client.lua" type="client" /> But it gives HTTP error on flash.txd Any idea how to fix this? thanks.
-
Hello, i want to ask how i can change the handling of a car, but in a particular map. I made a cool map and a script to change the handling, as i saw in an example at wiki. I have like that: addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), resourceStarted) But probably because its a map, and its not a resource of the server, its not working. Although i have FTP access as i am one of the leaders of the server, so is there any way i can make a script, when the particular map starts to run the script or somehow fix it? thanks.
-
It doesnt send the message where could i place it?
-
Its not working at all now, its white
-
It seems not, but still i dont want to remove the colorcode from the nicks