21.10.2010, 20:49
pawn Code:
if(pdss!=1)//LSPD Garage Shutter
{
if(PlayerToPoint(10,playerid,1592.720337,-1638.043579,14.911348))
{
MoveObject(pds,1592.720337,-1638.043579,9.612303,3);
pdss=1;
SetTimer("AutoClose",5000,0);
}
return 1;
}
else SendClientMessage(playerid,COLOR_GREY,"The gate is already open or you are too far.");
return 1;
}
but heres how i do with commands
pawn Code:
if(strcmp("/openirtgrg", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 25.0, 755.948486, -1337.448364, 15.041857))
{
if(gTeam[playerid] != TEAM_IRT)
return SendClientMessage(playerid, 0xEF994300, "you dont work in Interglobal Radio-Television!");
MoveObject(irtgarage, 755.948486, -1337.448364, 10.816921, 1);
SendClientMessage(playerid, 0xEF994300, "garage is opening...");
}
else
{
SendClientMessage(playerid, 0xEF994300, "youre not near garage!");
}
return 1;
}