29.04.2012, 13:00
Try this hope this works and it is untested:
pawn Код:
CMD:dooropen(playerid, params[])
{
if(playerVariables[playerid][pGroup] != 1)
{
return SendClientMessage(playerid,-1, "You are not a Prison Guard!");
}
else
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1812.0830,-1545.2319,5700.4287))
{
MoveObject(pdoor3,1811.73828125+1,-1545.82873535,5699.42480469,0.50);
MoveObject(pdoor4,1808.73071289-1,-1545.87463379,5699.42480469,0.50);
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid, 2.0,1797.00830078,-1525.15258789,5699.42480469) || IsPlayerInRangeOfPoint(playerid, 2.0, 1793.6631,-1523.9191,5700.4287))
{
MoveObject(edoor5,1797.00830078+1,-1525.15258789,5699.42480469,0.50);
MoveObject(edoor6,1794.00976562-1,-1525.18676758,5699.42480469,0.50);
return 1;
}
else SendClientMessage(playerid, 0xAA3333AA, "[Error]: {FFFFFF} You are not around a control pad!");
}
return 1;
}
CMD:doorclose(playerid, params[])
{
if(playerVariables[playerid][pGroup] != 1)
{
return SendClientMessage(playerid,-1, "You are not a prison guard!");
}
else
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1812.0830,-1545.2319,5700.4287))
{
MoveObject(pdoor3,1811.73828125,-1545.82873535,5699.42480469,0.50);
MoveObject(pdoor4,1808.73071289,-1545.87463379,5699.42480469,0.50);
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid, 2.0, 1797.00830078,-1525.15258789,5699.42480469) || IsPlayerInRangeOfPoint(playerid, 2.0, 1793.6631,-1523.9191,5700.4287))
{
MoveObject(edoor5,1797.00830078,-1525.15258789,5699.42480469,0.50);
MoveObject(edoor6,1794.00976562,-1525.18676758,5699.42480469,0.50);
return 1;
}
else SendClientMessage(playerid, 0xAA3333AA, "[Error]: {FFFFFF} You are not around a control pad!");
}
return 1;
}