LSPD Barrier move - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: LSPD Barrier move (
/showthread.php?tid=396247)
delete -
Mikkel_RE - 30.11.2012
delete
Re: LSPD Barrier move -
goviscrap - 30.11.2012
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..
Re: LSPD Barrier move -
Mikkel_RE - 01.12.2012
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
Re : LSPD Barrier move -
69 - 01.12.2012
Use MoveObject instead of SetObjectRot
Re: LSPD Barrier move -
Mikkel_RE - 01.12.2012
Can you send me your coordinates?
Re : LSPD Barrier move -
69 - 01.12.2012
https://sampwiki.blast.hk/wiki/MoveObject
Re: LSPD Barrier move -
Mikkel_RE - 01.12.2012
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;
}
}
}
Re : LSPD Barrier move -
69 - 01.12.2012
Give me the closed coordinates and the open coordinates.
Re: LSPD Barrier move -
Mikkel_RE - 01.12.2012
Код:
CLOSED: 1544.7,-1631, 13.4, 180, 90, 90
OPENED: 1544.7,-1631, 13.4, 180, 180, 90
Re: LSPD Barrier move -
Mikkel_RE - 01.12.2012
Isnt that right?