Need Help :) - 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: Need Help :) (
/showthread.php?tid=506053)
Need Help :) -
Symphony - 11.04.2014
Hello guys, I've got problem here.
I hope you guys can help me.
Here's my code.
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(PRESSED(KEY_CROUCH)
{
if(IsACop(playerid) && IsPlayerInRangeOfPoint(playerid, 6, 1544.7363,-1627.0232,13.3672)) // LSPD Barrier
{
if(!LSPDBarrierStatus)
{
LSPDBarrierStatus = 1;
MoveDynamicObject(LSPDBarrier, 1544.6943359375, -1630.73046875, 13.27956199646+0.0001, 0.0002, 0, 0, 90);
}
else
{
LSPDBarrierStatus = 0;
MoveDynamicObject(LSPDBarrier, 1544.6943359375, -1630.73046875, 13.27956199646-0.0001, 0.0003, 0, 90, 90);
}
return 1;
}
else if(IsACop(playerid) && IsPlayerInRangeOfPoint(playerid, 7, 1588.4501,-1638.5692,13.3672)) // LSPD Gate
{
if(!LSPDGateStatus)
{
LSPDGateStatus = 1;
MoveDynamicObject(LSPDGate, 1588.6501464844, -1638.0750732422, 6.2343215942383, 3);
}
else
{
LSPDGateStatus = 0;
MoveDynamicObject(LSPDGate, 1588.6428222656, -1638.02734375, 15.240161895752, 3);
}
return 1;
}
}
And the Error Pop-up
Код:
C:\Users\owner\Desktop\LA-RP.pwn(23034) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Re : Need Help :) -
S4t3K - 11.04.2014
Please, give us the line with errors.
Re: Need Help :) - Astralis - 11.04.2014
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(PRESSED(KEY_CROUCH)
{
if(IsACop(playerid) && IsPlayerInRangeOfPoint(playerid, 6, 1544.7363,-1627.0232,13.3672) // LSPD Barrier
{
if(!LSPDBarrierStatus)
{
LSPDBarrierStatus = 1;
MoveDynamicObject(LSPDBarrier, 1544.6943359375, -1630.73046875, 13.27956199646+0.0001, 0.0002, 0, 0, 90);
}
else
{
LSPDBarrierStatus = 0;
MoveDynamicObject(LSPDBarrier, 1544.6943359375, -1630.73046875, 13.27956199646-0.0001, 0.0003, 0, 90, 90);
}
return 1;
}
else if(IsACop(playerid) && IsPlayerInRangeOfPoint(playerid, 7, 1588.4501,-1638.5692,13.3672) // LSPD Gate
{
if(!LSPDGateStatus)
{
LSPDGateStatus = 1;
MoveDynamicObject(LSPDGate, 1588.6501464844, -1638.0750732422, 6.2343215942383, 3);
}
else
{
LSPDGateStatus = 0;
MoveDynamicObject(LSPDGate, 1588.6428222656, -1638.02734375, 15.240161895752, 3);
}
return 1;
}
}
Re: Need Help :) -
Symphony - 11.04.2014
Thanks for helping S4t3K & Neonman

.