28.03.2010, 22:53
I am trying to combine the two below functions... How can I do that?
Full script: Click here.
Both Parts:
I need to combine this...
and this...
together.
Anyone know how to do this? Thanks in advance.
Credits to: "[SAP]Sidhu", "Babul", and "[ĦŁ₣]ЉǾǖŦĦЗŁΛẄ".
Full script: Click here.
Both Parts:
I need to combine this...
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys & KEY_ANALOG_RIGHT) && !(oldkeys & KEY_ANALOG_RIGHT))
{
if(IsPlayerInRangeOfPoint(playerid, 200, 3459.901611, -683.968445, 1.892129))
{
if(IsPlayerLuxAdmin(playerid))
{
if(GateOpened == false)
{
MoveObject (gate1,3459.955566, -679.748474, 1.874337,2);
MoveObject (gate2,3459.746826, -693.807861, 1.874337,2);
SendClientMessage(playerid, 0x00ff00ff, "[Security System]: Access Granted! Have a nice day!");
GateOpened = true;
return 1;
}
else if(GateOpened == true)
{
MoveObject (gate1,3459.901611, -683.968445, 1.892129,2);
MoveObject (gate2,3459.791260, -689.405701, 1.892129,2);
GateOpened = false;
return 1;
}
}
}
}
return 1;
}
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys & KEY_ANALOG_RIGHT) && !(oldkeys & KEY_ANALOG_RIGHT))
{
if(IsPlayerLuxAdmin(playerid))
{
if(IsPlayerInRangeOfPoint(playerid, 200, 2287.92, 617.19, 12.00))
{
if(GateOpened == false)
{
MoveObject(admingate, 2287.92, 617.19, 6.00, 2);
SendClientMessage(playerid, COLOR_GREEN, "[Security System]: Access Granted! Have a nice day!");
GateOpened = true;
}
else if(GateOpened == true)
{
MoveObject (admingate, 2287.92, 617.19, 12.00, 2);
GateOpened = false;
}
}
else return 0;
}
else
{
}
return 1;
}
return 1;
}
Anyone know how to do this? Thanks in advance.
Credits to: "[SAP]Sidhu", "Babul", and "[ĦŁ₣]ЉǾǖŦĦЗŁΛẄ".