Question -
Eugene. - 03.09.2012
Well, Today I made an keypad thing for my LSPD doors and I have a little problem. Always when I am pressing 'enter' anywhere is doing the animation which should do only on the door. How can I fix that ? Codes:
Код:
if(newkeys & KEY_SECONDARY_ATTACK)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1288.8297,-1019.4271,1085.9760))
if(!IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an SAPD Officer.");
{
if(pddoor5opened == false)
{
ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
MoveDynamicObject(pddoor5, 1289.10, -1018.93, 1085.00, 0.50);
pddoor5opened = true;
return 1;
}
else
{
ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
MoveDynamicObject(pddoor5, 1288.06, -1018.93, 1085.00, 0.50);
pddoor5opened = false;
return 1;
}
}
}
return 1;
}
Re : Question -
Naruto_Emilio - 03.09.2012
pawn Код:
if(newkeys & KEY_SECONDARY_ATTACK)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1288.8297,-1019.4271,1085.9760))
{
if(!IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an SAPD Officer.");
{
if(pddoor5opened == false)
{
ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
MoveDynamicObject(pddoor5, 1289.10, -1018.93, 1085.00, 0.50);
pddoor5opened = true;
return 1;
}
else
{
ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
MoveDynamicObject(pddoor5, 1288.06, -1018.93, 1085.00, 0.50);
pddoor5opened = false;
return 1;
}
}
}
}
return 1;
}
Re: Question - HuSs3n - 03.09.2012
pawn Код:
if(newkeys & KEY_SECONDARY_ATTACK)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1288.8297,-1019.4271,1085.9760))
{
if(!IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an SAPD Officer.");
{
if(pddoor5opened == false)
{
ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
MoveDynamicObject(pddoor5, 1289.10, -1018.93, 1085.00, 0.50);
pddoor5opened = true;
return 1;
}
else
{
ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
MoveDynamicObject(pddoor5, 1288.06, -1018.93, 1085.00, 0.50);
pddoor5opened = false;
return 1;
}
}
}
}
return 1;
}
EDIT: ops im late
Re: Question -
[BOPE]Seu._.Madruga - 03.09.2012
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_SECONDARY_ATTACK)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1288.8297,-1019.4271,1085.9760))
{
if(!IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an SAPD Officer.");
if(pddoor5opened == false)
{
ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
MoveDynamicObject(pddoor5, 1289.10, -1018.93, 1085.00, 0.50);
pddoor5opened = true;
return 1;
}
else
{
ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
MoveDynamicObject(pddoor5, 1288.06, -1018.93, 1085.00, 0.50);
pddoor5opened = false;
return 1;
}
}
}
return 1;
}
Se ajudei da reputation
Re: Question -
Eugene. - 03.09.2012
Well, I tried all of them you gave me guys and I am getting lots of Errors from everywhere. The problem is still up.
Re: Question -
Eugene. - 04.09.2012
Fixed. Thank you.
Re: Question -
denNorske - 04.09.2012
Maybe a good idea to provide your "errors" so we could have a chance to find out what you struggle with. Just saying.