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
#2

Are you logged in as rcon admin?
Reply
#3

Quote:
Originally Posted by iLearner
Посмотреть сообщение
Are you logged in as rcon admin?
Sorry I do not understand. Because I want these gates to be opened as Faction people. And I want to make it into filterscripts.
Reply
#4

Your code says it can opened by RCON admin onlys, not faction members. that might be the problem.

Get your server rcon, use /rcon login <password>, and then try opening the gate-
Reply
#5

Quote:
Originally Posted by iLearner
Посмотреть сообщение
Your code says it can opened by RCON admin onlys, not faction members. that might be the problem.

Get your server rcon, use /rcon login <password>, and then try opening the gate-
Now I want to make Faction how should this be because of a friend on the forum dairy. Please help me because I just learned about this.
Reply
#6

Most likely you will have to implement the script into your gamemode as your can't access your gamemodes variables from filterscript (unless you use pvars).

Now, what I need to know is, which faction do you want to allow and how is that faction's variable named.
Reply
#7

Quote:
Originally Posted by iLearner
Посмотреть сообщение
Most likely you will have to implement the script into your gamemode as your can't access your gamemodes variables from filterscript (unless you use pvars).

Now, what I need to know is, which faction do you want to allow and how is that faction's variable named.
Can you help me milk it? Because I just do not practice so much. help me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)