
Dealman
Members-
Posts
1,421 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Dealman
-
Can't assist you if you don't supply us with enough code to help you. As Driggero said, it's not a string. If you're trying to store the name inside "mapName", it's most likely failing and returning false. Thus, the boolean.
-
Or you can do it the easier way; Create a GUI Button and place it over your DirectX Button. Then set the button's alpha to 0. That way, it won't be visible but can still be clicked. And then you can use the regular GUI events as you please onClientGUIClick onClientMouseEnter onClientMouseLeave
-
Yes, it's possible. I did it for a small project I was working on. See this code for an example;
-
Of course element data is lost if the player leaves the server. If you want it to be permanent, you'll have to use account data. setAccoundData getAccountData
-
Here's one I made for another thread, it's a bit overly complex but it does what you want Commands: /draw This will start drawing the rectangles. Run command again to hide them. /progress This will start progressing the timer with random values.
-
I'm trying to figure out a way to detect whenever the forklift is carrying an object, however, I am having issues achieving this. I couldn't find any event that was of any help and I have too little experience in constructing my own events from scratch, so far I've been trying to detect it with various functions with the help of a timer - but with no success. It would seem that whenever you're carrying an object with the Forklift, it doesn't count as the object is attached to the vehicle. Does anyone have any ideas of how to achieve this...?
-
Or if you don't want to use DX, you can use those functions; textCreateDisplay textCreateTextItem textDestroyDisplay textDestroyTextItem textDisplayAddObserver textDisplayAddText textDisplayRemoveObserver textDisplayRemoveText textItemGetColor textItemGetPosition textItemGetPriority textItemGetScale textItemGetText textItemSetColor textItemSetPosition textItemSetPriority textItemSetScale textItemSetText textDisplayGetObservers textDisplayIsObserver
-
And why exactly is that...? Everytime I've used it it has worked really well, and doesn't have any noticeable impact on loading times at all.
-
Here you have a working DirectX Progress Bar, ran via the use of commands. This was written entirely for testing purposes, so you will still have to modify it to do whatever you want it to do. It should be enough for you to do it yourself Commands: /draw This will start drawing the rectangles. Run command again to hide them. /progress This will start progressing the timer with random values. Edit: If you want the progress bar to extend all across the screen from left to right, you will have to do some small changes, I'm sure you can figure it out!
-
Well first of all, you're using it wrongly. You need to use onClientRender to draw DirectX Drawings. Otherwise they will only show up for one frame. You can make it invisible/visible by either changing the alpha to 0 or destroying the element. Or you could use removeEventHandler. Example; I can give you an example of how to do progress later, I need to make some dinner now.
-
Just increase or decrease the width of the rectangle, and it will look like it's moving left/right.
-
It will be stored in the RAM, rather than stored on the hard-drive. That way, people will have to re-download the client script everytime they join the server. This is to prevent script theft. You should use "cache=false" instead. False will store in RAM, true on HDD.
-
Funny that you mention that as I'm working on such a project currently. Any particular kind of job you'd be interested in?
-
I'm glad I could be of help
-
Ah, I completely forgot about that. Either way, you have the base code. You should be able to modify it to your needs.
-
cancelEvent will cancel that event. It will not let the player enter the vehicle and then kick him out.
-
Question 1; There are various ways you could do this. However, I would make use of those functions; onMarkerHit getElementType getVehicleTowedByVehicle Check if the element that hit the marker was a vehicle. Then check if that vehicle is a truck. Then you can use getVehicleTowedByVehicle to check if and what it is towing. If it is towing something, you can make sure it's towing the appropriate trailer as well. Question 2; To check if the player is a Trucker, you can make use of Account Data which is saved even if the player disconnects from the server. setAccountData getAccountData Simply make a check for the returned value. If it's the right one, go ahead and give them the money. If not, don't give them money. And then to make it so only Truckers can enter vehicles, you can use the above functions together with those; onVehicleEnter cancelEvent When a player tries to enter a vehicle, onVehicleEnter is triggered and returns the player element. Use this player element to get their account, check their account data to see if that player is a Trucker. If true, then do nothing - allow them to enter. If false, cancel the event using cancelEvent. This will prevent them from entering.
-
Here you go; Server-Side(Requires Admin permission); Client-Side;
-
You should be able to use those functions and events; onPlayerDamage cancelEvent I'd give you an example, but I've got to get back to work. Just home over lunch, if no-one else has responded by then I'll make one for you.
-
ِAlright but...how to +1 the Progress? or even -1 To simulate there effect that it is increasing or decreasing in progress, you simply increase or decrease the width of the rectangle. Driggero and TAPL gave you good examples.
-
dxDrawRectangle Edit: I made a quick image to try to explain it to you visually. You increase or decrease the width of Rectangle 3 to make it look like it's progressing.
-
I think he wants a command that takes a screenshot of another player. For example, if I'm in Los Santos and Player2 is in Las Venturas somewhere, I type "/ss Player2" - it would take a screenshot of that player. I've never worked with the screenshot functions, but I guess it's possible by using either setCameraMatrix or setCameraTarget.
-
It's not an image. That progress bar is most likely made out of rectangles only. Basically it's 2 rectangles inside a bigger rectangle. And then to increase the progress, you increase the width of the inner coloured rectangle, not the black one.
-
DX Drawing Functions. I'd recommend you use the GUI Editor.
-
Make your own progress bar using DirectX Drawing functions.