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 - BeckzyBoi

#1
Quote from: ysc3839 on Jul 12, 2018, 08:12 AM@BeckzyBoi #4 If I remembered correctly, you can just use player.Vehicle.EulerAngle.x = ... to change it.

You actually can't. Doing that will reset the y and z angles also. I've got no idea why. The way I posted to do it is the only accurate way.
#2
This is a much better way of doing it. It'll flip only the vehicle x rotation 180 degrees.

function onPlayerCommand(player, command, arguments)
{
    if (cmd == "flip")
    {
            if (player.State != 3) MessagePlayer("Error: You must be the driver of a vehicle.", player)
            else
            {
                local ax = player.Vehicle.EulerAngle.x, ay = player.Vehicle.EulerAngle.y, az = player.Vehicle.EulerAngle.z;
                player.Vehicle.EulerAngle = Vector(ax < 0 ? ax + 3.14159 : ax - 3.14159, ay, az);
                MessagePlayer("ACTION: You have flipped the vehicle.", player);
            }
        }
    }
}
#3
I'll say it again - VC-MP needs some sort of promo.
#4
Bugs and Crashes / Re: onPlayerStateChange
Jul 01, 2018, 04:30 AM
Quote from: kennedyarz on Jun 30, 2018, 01:37 PMand what kind of reports do you expect? is more used for functions Distance from point to point I suppose. such as executing an action when you are near a point.
Example:

function onScriptLoad()
{
BankIcon <- array(100, null );
}
 
function onPlayerStateChange( player, oldState, newState )
{
if(DistanceFromPoint( player.Pos.x, player.Pos.y,-908.874,-342.258)<50)
{
if(BankIcon[player.ID]==null) BankIcon[player.ID]=CreateMarker(player.UniqueWorld, Vector(-908.874,-342.258,10), 1, RGB(0, 0, 0),24);
}
if(DistanceFromPoint( player.Pos.x, player.Pos.y,-908.874,-342.258)>50)
{
if(BankIcon[player.ID]!=null) DestroyMarker(BankIcon[player.ID]),BankIcon[player.ID]=null;
}
}

which creates an icon when you're near the bank and disappears when you get away

I expecpted it to be called when the player's state changes from oldState to newState. Thanks for replying anyway.
#5
Bugs and Crashes / onPlayerStateChange
Jun 30, 2018, 09:34 AM
Sometimes onPlayerStateChange is called rapidly (more than once per second) and the oldState and newState are the same. Sorry if this is already known, but I did search the forum for "onPlayerStateChange" and didn't find any such report.
#6
Thanks for the heads up
#7
Support / Re: wiki.vc-mp.org down?
Jun 30, 2018, 04:01 AM
Alright thanks. I'll wait for wiki to be back up. There's no rush.
#8
Support / Re: wiki.vc-mp.org down?
Jun 30, 2018, 03:21 AM
Thanks for the quick reply. Can you please tell me the syntax of CreatePickup, and give me a list of pickup types? That's why I needed to use the wiki.

Edit: The client updater URL isn't working also.
#9
Support / wiki.vc-mp.org down?
Jun 30, 2018, 01:34 AM
Is VC-MP wiki down?
#10
I have had a timer, just one, in my script for a while now. - no problems. I've tried adding a second timer, and now I can't connect to my server. This happens and I get stuck there: https://imgur.com/a/GStCTXB . Adding just NewTimer works fine, it's when I add the timer function that the problem occurs. E.g:

onScriptLoad()
{
    NewTimer("TimerOneName", 1000, 0);
    NewTimer("TimerTwoName", 500, 0);
}

I can still connect with that. But:

onScriptLoad()
{
    NewTimer("TimerOneName", 1000, 0);
    NewTimer("TimerTwpName", 500, 0);
}

function TimerOneName()
{

}

function TimerTwoName()
{

}

I can't connect with that.

Edit: I modified the position of the functions and now it's working. Strange.
#11
GetVehicleCount works fine for me on v30 x64. Can you tell me which server version (not release) you're using?
#12
Quote from: MadMax on Jun 29, 2018, 09:56 AM
Quote from: rww on Jun 29, 2018, 09:32 AMTry to remove some commands and test it, if it still doesn't work, try with another commands. Error in another command, not here.
It's not working I've tried

Remove all commands expect "vehicles" and then try. If it works then it's one of your other commands. You'll then have to remove one-by-one to debug it.
#13
Quote from: KrooB on Jun 29, 2018, 09:41 AMwhat ?


Nobody's server is showing. Only official servers.
#14
Quote from: KrooB on Jun 29, 2018, 09:32 AMWhy my server not showing server list ?


No1s is.