Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - h
1
Servers / Re: Deathmatch Smashing ZonE.
« on July 9th, 12:45 AM »
good luck! 8)
2
Tutorials / [Guide][Squirrel][discord04relx] Re: Creating a discord bot
« on June 19th, 12:12 AM »
Useful
3
Impressive :o
4
I have inserted a file "generic.txd" that contains textures of palm trees and roads, the problem is that the texture of the road is only generated in a single part of the map as you can see below:
5
Object Showroom / Re: Problem with some objects
« on July 3rd, 2021, 10:48 PM »
It seems that I fix the problem with the collision by changing it from COL3 to COL1. Many thanks friends. @solved
6
Object Showroom / Re: Problem with some objects
« on July 3rd, 2021, 09:51 PM »
Quote from SexAppeal on July 3rd, 2021, 09:48 PM
"the collision has over 12000 triangles"
I tried to match the collision with the dff using the CollEditor2 program, but it throws an error: "Stream Read Error".
7
Object Showroom / Re: Problem with some objects
« on July 3rd, 2021, 09:48 PM »
"the collision has over 12000 triangles"
8
Object Showroom / Re: Problem with some objects
« on July 3rd, 2021, 09:47 PM »
Quote from Spiller on July 2nd, 2021, 04:34 AM
/setconfig game_showdebug 1

Use that and then enter the server, it should give you an idea about what is wrong.
The command was of great help, I was able to discover that the problem comes from the .col file, below I will show a screenshot of what happens.
9
Object Showroom / Re: Problem with some objects
« on July 3rd, 2021, 09:46 PM »
Quote from Sebastian on July 1st, 2021, 06:50 PM
can you share the files ? or, at least the objects.xml code. Maybe you forgot to add somethin'
I used the command that Spiller gave me and I found 2 errors; The first has to do with textures (I solved that by changing the format from SA to VC), but here the real problem comes from the collision (it should be noted that the object I take is for San Andreas but I tried to convert it to VC) .
10
Object Showroom / Re: Problem with some objects
« on July 1st, 2021, 07:32 AM »
Quote from SexAppeal on July 1st, 2021, 07:31 AM
I have always had this problem when adding custom objects on my server, I do not understand why this happens and what generates it.
Taking into account that I have already added the documentation and the files in their specified format for the object.
11
Object Showroom / Problem with some objects
« on July 1st, 2021, 07:31 AM »
I have always had this problem when adding custom objects on my server, I do not understand why this happens and what generates it.
12
Script Showroom / Re: Home And Shop System For Roleplay
« on June 24th, 2021, 04:32 AM »
Quote from Kuungu on June 23rd, 2021, 03:21 PM
if ( cmd == "House" )
    {
    if ( player.Name == "Hulki" )
    {
   Announce( "~y~Welcome House.", player, 1 );
    player.Pos = Vector ( 557.858, 17.3716, 52.7512 );
    }

if ( cmd == "Malubu" )
    {
    if ( player.Name == "Authorized person" )
    {
    Announce("~y~Welcome Malubu", player, 1 );
    player.Pos = Vector ( -846.527, -72.5197, 11.5413 );
    }

if ( cmd == "bar" )
    {
    if ( player.Name == "Authorized person" )
    {
    Announce("~y~Welcome Bar", player, 1 );
    player.Pos = Vector ( -594.766, 644.979, 11.6765 );
    }
?
13
Script Showroom / [Release] Re: Mailer Lite
« on April 17th, 2021, 02:34 AM »
Excellent contribution friend, you can give a lot of use to this!
14
Scripting and Server Management / Re: Custom game map (GUI)
« on March 22nd, 2021, 07:29 AM »
Quote from Razor. on March 18th, 2021, 12:51 PM
Quote from Sebastian on March 18th, 2021, 10:23 AM
@Razor. did a custom radar, so maybe he can help.


I assume you want a custom map like the one you access through Main Menu -> Map.
Well, first I used an original map sprite and then I resized it to the size that matches the radar in GTA V (that's right, the rectangular shape), after that I used the Sprite UV method, this method consists of cutting a sprite being able to use 4 corners of it being:
Code: [Select]
BottomRightUV = VectorScreen(X, Y)
TopLeftUV = VectorScreen(X, Y)
There's a better explanation made by @DMWarrior
https://forum.vc-mp.org/?topic=7586.msg47629#msg47629

When using this function, it doesn't matter if the image size is 1024x760 or 1366×1200, as long as you keep the map in the same place you want to make it in the calculation, no matter what resolution, it will always still in the same place.

Then I used the Script::ScriptProcess() method and used calculations so that the player is in agreement with the cut of the map (UV Sprite), it is also necessary that you involve some calc in the same line to avoid the Sprite stretch, this is really a horrible thing to do.
Calculating the position of the player has been a headache, but I will not rest until I find a possible solution to it, thanks for that recommendation.
15
Scripting and Server Management / Re: Custom game map (GUI)
« on March 22nd, 2021, 07:27 AM »
Quote from Spiller on March 18th, 2021, 12:21 PM
This is happening because the map (in world) is bigger than your sprite.

Thanks to SpitFire for this information, The map starts from Vector2(-1550, -1950) and ends at Vector2(1550, 1950) i.e 3100 x 3900 in size compared to your 1024 x 1024 sprite.

Here's a visualization:
(click to show/hide)

To fix this, you have 2 methods,

First would be to use a map that is 3100px x 3900px in dimension.

Second is, you scale down coordinates of the map to match your sprite's dimensions. If your sprite is 1024x1024, you'd require to divide player.Pos.x by 3100 / 1024 = 3.027 and player.Pos.y by 3900 / 1024 = 3.8085 (approx).

for instance, if the position of your player is Vector3(832.0377, -459.89297, 2014.9727) the position on map would be X 832.0377/3.027 and Y -459.89297/3.8085 i.e Vector2(274.8720, -120.75435)



I hope this helps, I'm not sure about anything but this should technically work as long as all the variables I took were correct.

* Do note that in both cases, the (0, 0) of your sprite should fall exactly on (-1550, -1950) of the map, otherwise it will not be accurate. In other words, you'll need an accurate representation of the map.
This can serve as a basis to test, I will try and see what I can do, thanks friend!