LSPD Barrier move
#1

delete
Reply
#2

You need to add the Speed in the script for it to move... What happens if you add
Код:
if(newkeys & KEY_CROUCH && !(oldkeys & KEY_CROUCH)) //horn
    {
        if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            if(PlayerToPoint(15.0,playerid,1544.3,-1627.3,13.3))  //near barrier
            {
                if(IsACop(playerid) || PlayerInfo[playerid][pAdmin] & ADMIN_ACCESS)
                {
                    if(barrier_to_garage == 0)
                    {
                        SetObjectRot(lspd_garage_barrier1, 180, 180, 90, 1.5);// 1.5 Try this and see if it works.
                        barrier_to_garage = 1;
                        return 1;
                    }
                    else
                    {
                        SetObjectRot(lspd_garage_barrier1, 180, 90, 90, 1.5);//1.5 Try this and see if it works.
                        barrier_to_garage = 0;
                        return 1;
                    }
                }
            }
For my gates and other moveable objects after 3 "," i have the speed for it to move..
Reply
#3

I added that and now i just got two warnings when i compile it, and nothing is diffrent in game

Код:
C:\Users\vMikkelReimer\Desktop\Samp stuff for 0,3d  June-May2012\Samp crap 2012\gf_nov28.pwn(6713) : warning 202: number of arguments does not match definition
C:\Users\vMikkelReimer\Desktop\Samp stuff for 0,3d  June-May2012\Samp crap 2012\gf_nov28.pwn(6719) : warning 202: number of arguments does not match definition
Reply
#4

Use MoveObject instead of SetObjectRot
Reply
#5

Can you send me your coordinates?
Reply
#6

https://sampwiki.blast.hk/wiki/MoveObject
Reply
#7

I have made this instead, but the barrier is fucking up when i open and close it

Код:
    if(newkeys & KEY_CROUCH && !(oldkeys & KEY_CROUCH)) //horn
    {
        if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            if(PlayerToPoint(15.0,playerid,1544.3,-1627.3,13.3))  //near barrier
            {
                if(IsACop(playerid) || PlayerInfo[playerid][pAdmin] & ADMIN_ACCESS)
                {
                    if(barrier_to_garage == 0)
                    {
                        MoveObject(lspd_garage_barrier1, 1544.7,-1631, 13.4, 180, 180, 90, 1.5);
                        barrier_to_garage = 1;
                        return 1;
                    }
                    else
                    {
                        MoveObject(lspd_garage_barrier1, 1544.7,-1631, 13.4, 180, 90, 90, 1.5);
                        barrier_to_garage = 0;
                        return 1;
                    }
                }
            }
Reply
#8

Give me the closed coordinates and the open coordinates.
Reply
#9

Код:
CLOSED: 1544.7,-1631, 13.4, 180, 90, 90
OPENED: 1544.7,-1631, 13.4, 180, 180, 90
Reply
#10

Isnt that right?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)