25.03.2011, 14:31
i made a gate code so itll move these gates but they dont move!
Can anyone help me?
pawn Код:
if(!strcmp(cmdtext, "/hgate512", true)) // By CuervO_NegrO
{
if(IsPlayerConnected(playerid))
{
if (IsPlayerInRangeOfPoint(playerid, 15,767.8782,-1330.0404,13.5479))
{
if(houseg == 1) { SendClientMessage(playerid, COLOR_GREY, "** Gate is Already Opened"); return 1; }
MoveDynamicObject(houseg,767.8782,-1330.0404,13.5479, 0.8);
SetTimer("GateClose7", 7000, 0);
SendClientMessage(playerid, COLOR_BLUE,"A garage is opened and will close in 7 seconds.");
format(string, sizeof(string), "* %s takes his/her remote and opens a garage.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
PlayerPlaySound(playerid, 1153, 757.8782,-1330.0404,13.5479);
houseg = 1;
}
else if (IsPlayerInRangeOfPoint(playerid, 15,777.8782,-1385.0404,13.5479))
{
if(houseg1 == 1) { SendClientMessage(playerid, COLOR_GREY, "** Gate is Already Opened"); return 1; }
MoveDynamicObject(houseg1,777.8782,-1385.0404,13.5479, 0.8);
SetTimer("GateClose8", 7000, 0);
SendClientMessage(playerid, COLOR_BLUE,"A garage is opened and will close in 7 seconds.");
format(string, sizeof(string), "* %s takes his/her remote and opens a garage.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
PlayerPlaySound(playerid, 1153,767.8782,-1385.0404,13.5479);
houseg1 = 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY,"* Not near a Gate that you can use.");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY,"* You don't have a remote control.");
return 1;
}
return 1;
}