Help me on port using Key
#1

I did a script and it can not use [F] to open the port. It does not move and I want to do this port for Faction such as LSPD or SASD. Please help me .
Код:
#include <a_samp>
new pddoor1, pddoor2, pddoor3;

forward doorclose1(playerid);
forward doorclose2(playerid);
forward doorclose3(playerid);

public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
    if (newkeys & KEY_SECONDARY_ATTACK)
 {
        if(IsPlayerInRangeOfPoint(playerid, 4.0, 588.5473,-3234.3591,110.1165))
        {
            if (IsPlayerAdmin (playerid))
            {
                MoveObject(pddoor1, 587.841918, -3233.680908, 110.116477,1.5);
                SetTimerEx("doorclose1", 5000, false, "i", playerid);
                ApplyAnimation (playerid, "HEIST9", "Use_SwipeCard", 10.0, 0, 0, 0, 0, 0);
            }
        }
        if(IsPlayerInRangeOfPoint(playerid, 4.0, 580.5657, -3237.5479, 113.6297))
        {
            if (IsPlayerAdmin (playerid))
            {
                MoveObject(pddoor2, 579.981933, -3237.977783, 113.629692,1.5);
                SetTimerEx("doorclose2", 5000, false, "i", playerid);
                ApplyAnimation (playerid, "HEIST9", "Use_SwipeCard", 10.0, 0, 0, 0, 0, 0);
            }
        }
        if(IsPlayerInRangeOfPoint(playerid, 4.0, 600.8785, -3239.9939, 110.0865))
        {
            if (IsPlayerAdmin (playerid))
            {
                MoveObject(pddoor3, 579.9819, -3237.9858, 113.6297,1.5);
                SetTimerEx("doorclose3", 5000, false, "i", playerid);
                ApplyAnimation (playerid, "HEIST9", "Use_SwipeCard", 10.0, 0, 0, 0, 0, 0);
            }
        }
        }
    return 1;
}
public doorclose1(playerid)
{
    MoveObject(pddoor1, 599.9600, -3239.4077, 110.0865,1.5);
    return 1;
}

public doorclose2(playerid)
{
    MoveObject(pddoor2, 587.8419, -3235.1840, 110.1165,1.5);
    return 1;
}

public doorclose3(playerid)
{
    MoveObject(pddoor3, 581.4840, -3237.9858, 113.6297,1.5);
    return 1;
}
Reply


Messages In This Thread
Help me on port using Key - by BanhVo - 10.01.2018, 05:19
Re: Help me on port using Key - by iLearner - 10.01.2018, 05:30
Re: Help me on port using Key - by BanhVo - 10.01.2018, 05:34
Re: Help me on port using Key - by iLearner - 10.01.2018, 05:36
Re: Help me on port using Key - by BanhVo - 10.01.2018, 05:38
Re: Help me on port using Key - by iLearner - 10.01.2018, 05:46
Re: Help me on port using Key - by BanhVo - 10.01.2018, 05:57

Forum Jump:


Users browsing this thread: 2 Guest(s)