12.05.2011, 15:28
Hi.
I made this command, it works perfectly when i am not in car, but doesn't work if i'm in car, It just doesn't do anything.
Code is here..
I made this command, it works perfectly when i am not in car, but doesn't work if i'm in car, It just doesn't do anything.
Code is here..
pawn Код:
if ( PRESSED(KEY_LOOK_BEHIND) )
{
new pName[64];
GetPlayerName(playerid,pName,64);
if(!strcmp(pName,"Steven_Hayen",true))
{
if(IsPlayerInRangeOfPoint(playerid, 14,323.3900,-1190.5800,76.0000))
{
if(varav2 == 0)
{
MoveObject(gate, 321.25000000,-1188.27000000,69.66000000,2.00000000);
MoveObject(gate1, 319.14000000,-1190.06000000,68.31000000,2.00000000);
MoveObject(gate2, 319.14000000,-1190.06000000,70.48000000,2.000000000);
MoveObject(gate3, 321.44000000,-1188.21000000,68.31000000,2.000000000);
MoveObject(gate4, 321.45000000,-1188.22000000,70.48000000,2.000000000);
SendClientMessage(playerid, COLOR_BLUE,"Gate opened!");
GetPlayerName(playerid, sendername, sizeof(sendername));
varav2 = 1;
}
else
{
MoveObject(gate, 321.25000000,-1188.27000000,76.35000000,2.00000000);//CreateObject(971,321.35000000,-1188.27000000,76.35000000,0.00000000,0.00000000,38.33000000);
MoveObject(gate1, 319.14000000,-1190.06000000,75.00000000,2.00000000);
MoveObject(gate2, 319.14000000,-1190.06000000,77.17000000,2.00000000);
MoveObject(gate3, 321.44000000,-1188.21000000,75.00000000,2.00000000);
MoveObject(gate4, 321.45000000,-1188.22000000,77.17000000,2.00000000);
SendClientMessage(playerid, COLOR_BLUE,"Gate closed!");
GetPlayerName(playerid, sendername, sizeof(sendername));
varav2 = 0;
}
}
}