11.04.2014, 15:24
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;
}
}