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

Messages - Kenneth Law

#31
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?
#32
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
#33
oh oh ok
#34
General Discussion / Re: New feature request
Sep 11, 2019, 06:43 AM
Quote from: Doom_Kill3R on Sep 11, 2019, 06:37 AMIts not implemented yet
Alright...Any idea when it will be on?
#35
General Discussion / Re: New feature request
Sep 11, 2019, 06:16 AM
Quote from: Doom_Kill3R on Sep 11, 2019, 04:53 AM
Quote from: Kenneth Law on Sep 11, 2019, 12:48 AMHow? Can a player decide whichever weather he wants via Client-Side?

Nah you can just set a player's weather client side if his world is different, this will change the weather only for that player and not the whole server.
Sounds not bad. Could you tell me how to edit? What's the code for it?
#36
General Discussion / Re: New feature request
Sep 11, 2019, 12:48 AM
Quote from: Athanatos on Sep 10, 2019, 06:52 PMClient-side weather settings should be enough.
How? Can a player decide whichever weather he wants via Client-Side?
#37
Quote from: Athanatos on Sep 10, 2019, 06:56 PM
Quote from: Kenneth Law on Sep 10, 2019, 08:57 AMI've used the code vehicle.Locked=true but players can still get in the bike.
Read posts carefully, and don't use google translate.
I wasn't using any translator man. And which post exactly do you refer to?
#38
Quote from: MatheuS on Sep 10, 2019, 11:45 AM
Quote from: Kenneth Law on Sep 10, 2019, 10:49 AM
Quote from: MEGAMIND on Sep 10, 2019, 10:30 AM
Quote from: Kenneth Law on Sep 10, 2019, 08:57 AMHow 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?
hmm well, try to eject player from vehicle and display message its locked but define if its vehicle 191 for bike
It's too wired to eject a player from a bike. In fact, the server Argonath RPG has found a way to avoid a player from getting on a bike without ejection. But I don't know how that is done. So I want someone to tell me.

try using this:

function onPlayerEnteringVehicle( player, vehicle, door )
{
if( vehicle.Model == 191 ) return 0;
}
Cool! It works! Thanks a lot for your help!
#39
Quote from: MEGAMIND on Sep 10, 2019, 10:30 AM
Quote from: Kenneth Law on Sep 10, 2019, 08:57 AMHow 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?
hmm well, try to eject player from vehicle and display message its locked but define if its vehicle 191 for bike
It's too wired to eject a player from a bike. In fact, the server Argonath RPG has found a way to avoid a player from getting on a bike without ejection. But I don't know how that is done. So I want someone to tell me.
#40
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?
#41
General Discussion / Re: New feature request
Sep 10, 2019, 07:51 AM
Any staff here feels free to reply to this post? ;D
I am really in need of this new function in order for my server to be improved.
#42
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?
#43
General Discussion / Re: Little Help Needed
Sep 10, 2019, 07:25 AM
I hope it can be possible that we can set different time and weather for each separate world.
Because I am currently planning an update of my racing server including adding different settings for each race which occurs in different world.
#44
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!
#45
Quote from: umar4911 on Apr 12, 2019, 09:07 AM
Quote from: Kenneth Law on Apr 12, 2019, 08:45 AMI tried to add akina hill through the scripts with 'CreateObject', which works well with .xml.
But as I joined the server the mountain didn't appear.
I then took a helicopter and drove it around the area where I've placed the hill.
As soon as I flied into a certain range and height, the mountain magically appeared but not with an intact look.
It's weird!
what's the draw distance for the object? Trying again after changing the distance to 299 or 300
I changed the distance to 299 and 300, neither of them are working tho
Still the mountain is invisible