SA-MP Forums Archive
Gate Command Issues - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Gate Command Issues (/showthread.php?tid=191681)



Gate Command Issues - [UG]Scripter - 20.11.2010

Okay,

So I haev ac ommand that sets the Team which allows me to open the Gate(s).

The command works fine but the Gate Commands do not work.


I have checked the co ords, I do use a timer to close the Gates. Here is the commands.

pawn Код:
if(strcmp(cmdtext,"/ap") == 0)
    {
    if(PlayerTeam[playerid] == Team_Fire || PlayerTeam[playerid] == Team_LVPD || PlayerTeam[playerid] == Team_EMS)
    {
    MoveObject(AirportGate,2114.857421875,2841.505859375,12.5,10);
    }
    return 1;
    }
    if(strcmp(cmdtext,"/fd") == 0)
    {
    if(PlayerTeam[playerid] == Team_Fire)
    {
    SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: Fire Dept Gate Opening!");
    MoveObject(FireGate,2526.25,683.5712890625,11.495002746582,10);
    }
    return 1;
    }
Any help is appreciated


Re: Gate Command Issues - Larsey123IsMe - 20.11.2010

What about this? xD

pawn Код:
#define COLOR_YELLOW 0x33AA33AA

new AirportGate;
new FireGate;

forward Resetbase();
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    //AirportGate
    if (strcmp("/ap", cmdtext, true) == 0)
    {
        if(PlayerTeam[playerid] == Team_Fire || PlayerTeam[playerid] == Team_LVPD || PlayerTeam[playerid] == Team_EMS)
        {
            MoveObject(AirportGate, 2114.857421875,2841.505859375,12.5,10); //Coordinates when it should be open
            SetTimer("Resetbase",5000,0); //you can change the time, it closes after 5 seconds now.
            return 1;
        }
    }
    //FireGate
    if (strcmp("/fd", cmdtext, true) == 0)
    {
        if(PlayerTeam[playerid] == Team_Fire)
        {
            SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: Fire Dept Gate Opening!");
            MoveObject(FireGate,2526.25,683.5712890625,11.495002746582,10) //Coordinates when it should be open
            SetTimer("Resetbase",5000,0); //you can change the time, it closes after 5 seconds now.
            return 1;
        }
    }
    return 0;
}
pawn Код:
public Resetbase()
{
    MoveObject(AirportGate, 958.1621,2103.1962,1011.2694, 2.00); //Coordinates when it should be locked
    MoveObject(FireGate, 960.1875,2090.7861,9.7842, 2.00); //Coordinates when it should be locked
    }



Re: Gate Command Issues - [UG]Scripter - 20.11.2010

Thats pritty much what I have my issue is this:



Uploaded with ImageShack.us


Re: Gate Command Issues - Steven82 - 20.11.2010

Well thats weird that it's not working


Re: Gate Command Issues - [UG]Scripter - 20.11.2010

Quote:
Originally Posted by Steven82
Посмотреть сообщение
Well thats weird that it's not working
Fixed it.

AirportGate = CreateDynamicObject.

Public GateClose() had MoveObject Not MoveDynamicObject


Re: Gate Command Issues - Steven82 - 20.11.2010

Quote:
Originally Posted by [UG]Scripter
Посмотреть сообщение
Fixed it.

AirportGate = CreateDynamicObject.

Public GateClose() had MoveObject Not MoveDynamicObject
Fail


THIS MESSAGE ISN'T TOO SHORT NOW YOU FUCKING RETARDED ANIT-SPAM SYSTEM!