Menu

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.

Show posts Menu

Topics - Kenneth Law

#1
ffs make the wiki back please!!
The official wiki which linked from VCMP website has been down for too long!
http://wiki.adtec.ovh/ This one also became inaccessible from last several days.
Now the only one I can visit is the one by master thijn
http://wiki.thijn.ovh/
Please make the official one back online ok?
#2
Adding too many custom maps causes severe game crash everytime when I try to join the server. Note that these are only part of maps that I am going to add in. Please support any possible way for me to break the maps limit would you? ;)
Here is the link of image showing the crash messages when joining server https://kdocs.cn/l/cobr0T6Sq4Fx
#3
I've added more than 20 maps into my server and still there are more to be added in. But now as the amount of custom maps keeps increasing I found it unable to join the server. Everytime I join it shows a message " Crashed with address 7033F77E. Log created to crashlogs folder. ". So does it have some restrictions on custom maps or something?
#4
SetShowOnlyTeamMarkers(true) can only be toggled when players are close enough. It doesn't work if they're far apart or in different worlds.
For example here we have two players who are in a same team initially and they can see each other from radar. If I set their respective team to different ones after they went far away from each other, markers will still remain visible on radar for both of them unless they two approach near again.
It goes same when I try to turn players of different teams into teammates. Markers fail to appear for each of themselves until they get into a short distance.
Is there any solutions to the problem? :'(
#5
Anyone knows how to create pieces of sea rectangle which can drown players?
My idea is to build another large custom map high up to sky and fill sea around it to make it not be floating in sight :P  Just want the custom map to become a real world.
No! Please don't try to tell me the function SetWaterLevel() because I've tried it and found that the water only existed outside the default vice city island. There is actually a lack of sea in the part of the original island area.
#6
Give a situation that I have localed a table like
local table = { "a": 1, "b": 2, "c": 3 };
How can I add a new key and a new value for it then?
For example a new key which is "d" and a new value which is 4 so that the table will become { "a": 1, "b": 2, "c": 3, "d": 4 };
#7
Support / Question about player's marker
Nov 25, 2020, 04:45 AM
How to make the marker of a specific player visible for just part of players? Note that NEITHER FOR NONE OF PLAYERS NOR FOR ALL PLAYERS. Something like player.RemoveMarker() or player.IsOnRadar = false can only hide the marker for all which is not what I want. I know changing their world helps but I want them to be in one world.
Also, I am not talking about the function SetShowOnlyTeamMarkers(true). Let's just talk about the situation that players are grouped into two teams which are separately A and B, and I want to make A visible for B while B invisible for A.
#8
Bugs and Crashes / [BUG]GUI label invisible!!
Feb 15, 2020, 02:40 AM
Description
Some labels with certain text and font sizes do not show up.
For instance:
label = GUILabel();
label.Pos = VectorScreen(300, 200);
label.TextColour = Colour(255, 255, 255);
label.Text = "test";
label.FontSize = 14;
But if I change the text to "testtesttest" or set the font size to 18, it becomes visible again.

Reproducible
always

What you were doing when the bug happened
Not doing anything

What you think caused the bug
I don't know. It's very strange.
#9
Description
Let's just start with an example.
At first I defined an array
Array<-array(2,array(2,0));And while I changed the value of Array[1][1] to 3, the value of Array[2][1] was also automatically changed to 3, which is not reasonable.
I have tested a lot of times and it was proved that the value of Array[2][1] always equals to that of Array[1][1] no matter how I try to make them two different elements.
Here is the code which I used for test
function onScriptLoad()
{
Array<-array(2,array(2,0));
}
function onPlayerCommand( player, cmd, text )
{
if(cmd=="change")
{
if(text&&IsNum(text))
{
Array[1][1]=text.tointeger();
}
}
else if(cmd=="check")
{
MessagePlayer("Array[2][1]: "+Array[2][1],player);
}
}

Reproducible
Always

What you were doing when the bug happened

Not doing anything

What you think caused the bug
Maybe squirrel language doesn't allow the existence of two-dimensional array?
#10
Bugs and Crashes / Bugs of function AddChild
Sep 24, 2019, 09:18 AM


Description
Once an element was added as a child of another one, its alpha will always follow its parent's one. And also, this only occurs when I re-change the parent's alpha.
Like there are two labels whose names are A and B. I made label A a child of label B. Now if I reset the alpha of label B to a different value, the alpha of label A will also be changed automatically to the same value as that of label B.

Reproducible
Always

What you were doing when the bug happened
I was changing the alpha of parent's element.

What you think caused the bug
One element being a child of another one
#11
How can I lock a bike? I've used the code vehicle.Locked=true but players can still get in the bike. So any way to lock it?
#12
General Discussion / New feature request
Sep 10, 2019, 07:42 AM
It will be much better if we can set weather and time for a certain world.
Just wondering if it can be realized in the future?
#13
I found a very interesting bug which took me about two days to finally figure out how it occurred. The bug is about the spawn of vehicles and the following is the description of it.
Whenever I spawn a boat anywhere, the boat will simply stay at the spawn location without being affected by gravity if there is no player nearby it. And only when a player gets close to the boat, it falls down. For instance, the spawn position for  a boat is Vector(0, 0, 500), and if none of player is around it after it spawns, it will keep stay in the sky at the altitude of 500 instead of falling down itself for the sake of gravity. If you want to test this strange phenomenon, just use player.SetCameraPos to move your view to where the boat is supposed to spawn and spawn it with command while you make sure there is no one near the boat, and take a look at the funny frozen boat being suspended in sky.
This bug only works for boat but not for other types of vehicles. I don't know why but it is really irrational!
#14
I used ScriptProcess in client side for 3D GUI label display but there seemed to be a serious frame issue after this was added.
I wrote some codes for transforming the 3D position of the world into screen position and moving the labels to the position accordingly into ScriptProcess and found that this function which performs callback per frame would lead to a frame skipping, especially when there were too many lines included in the event.
This has been tested for lots of times by making a comparison between the two situations in which I reserved and removed the ScriptProcess.
An evident distinction in frame rate was proved existing between them.
So is there anything wrong with the codes in client script being processed each frame since the frame rate looks unstable and low while they do so?
#15
Please tell me how I can restrict the existence of custom maps (objects) to a certain world?
By questioning this I mean, is there any way to place my custom maps into only one world instead of letting the maps exist in all of the worlds?
Inside the file "maps.xml" I can't decide in which world they are.
I guess someone might suggest me to create objects in scripts but as I've tried, the maps can't be added into the server in this way as they even don't appear at all.
#16
Anyone knows how to rotate a GUI sprite?
https://forum.vc-mp.org/?topic=4710.msg34467#msg34467
I've viewed the link above and found these two codes
GUISprite.Rotation
GUISprite.RotationCentre
but have no idea how to use it. I would appreciate if someone could help me with it!