MoveObject( Heelp - 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: MoveObject( Heelp (
/showthread.php?tid=396876)
MoveObject( Heelp -
Mikkel_RE - 02.12.2012
This is to open the barrier at LSPD but when i open it ingame nothing happens
Please help!
I'm using this code:
pawn Код:
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, 1.5);
barrier_to_garage = 1;
return 1;
}
else
{
MoveObject(lspd_garage_barrier1, 1544.7,-1631, 13.4, 180, 90, 1.5);
barrier_to_garage = 0;
return 1;
}
}
}
Re: MoveObject( Heelp -
Mikkel_RE - 02.12.2012
Anyone?
Re: MoveObject( Heelp -
Vince - 02.12.2012
pawn Код:
PlayerInfo[playerid][pAdmin] & ADMIN_ACCESS
Are you sure this is correct? It is syntactically correct, but is it logically correct?
Also
get rid of old methods.
Re: MoveObject( Heelp -
Mikkel_RE - 02.12.2012
Yeah that's correct, it's just so admins can open the barrier too
Re: MoveObject( Heelp -
DexterBR - 03.12.2012
Try just
Код:
PlayerInfo[playerid][pAdmin]
Re: MoveObject( Heelp -
maramizo - 03.12.2012
You'd also need && instead of &, as & "adds" them.
Re: MoveObject( Heelp -
Mikkel_RE - 03.12.2012
Also, it worked fine when i used SetObjectRot( but when i changed to MoveObject( the barrier got bugged..
Re: MoveObject( Heelp -
jueix - 03.12.2012
Quote:
Originally Posted by Mikkel_RE
This is to open the barrier at LSPD but when i open it ingame nothing happens Please help!
I'm using this code:
pawn Код:
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, 1.5); barrier_to_garage = 1; return 1; } else { MoveObject(lspd_garage_barrier1, 1544.7,-1631, 13.4, 180, 90, 1.5); barrier_to_garage = 0; return 1; } } }
|
pawn Код:
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, 10.0, 180, 180, 1.5);
barrier_to_garage = 1;
return 1;
}
else
{
MoveObject(lspd_garage_barrier1, 1544.7,-1631, 13.4, 10.0, 180, 90, 1.5);
barrier_to_garage = 0;
return 1;
}
}
}
try this
Re: MoveObject( Heelp -
Mikkel_RE - 03.12.2012
Nope it's still the same
Re: MoveObject( Heelp -
jueix - 03.12.2012
Quote:
Originally Posted by Mikkel_RE
Nope it's still the same
|
Fuck knows then.