PHP код:
new BarrierLSPD;
public OnGameModeInit(){
BarrierLSPD = CreateObject(968, 1544.71228, -1630.80835, 13.16060, 0.00000, -90.00000, -90.00000);
return true;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){
if((newkeys & KEY_CROUCH) && !(oldkeys & KEY_CROUCH)){
if(Informacion[playerid][Faccion] == 1){
if(IsPlayerInRangeOfPoint(playerid, 10.0, 1544.70496, -1630.79773, 12.96850)){
MoveObject(BarrierLSPD, 1544.71228, -1630.80835, 13.16060+000.1, 000.1, 0.00000, 0.00000, -90.00000);
SetTimerEx("CloseBarrier", 6000, false, "i", playerid);
}
}
}
return true;
}
public CloseBarrier(playerid){
MoveObject(BarrierLSPD, 1544.71228, -1630.80835, 13.16060-000.1, 000.1, 0.00000, -90.00000, -90.00000);
return true;
}