Gate Command Issues
#1

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

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
    }
Reply
#3

Thats pritty much what I have my issue is this:



Uploaded with ImageShack.us
Reply
#4

Well thats weird that it's not working
Reply
#5

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

AirportGate = CreateDynamicObject.

Public GateClose() had MoveObject Not MoveDynamicObject
Reply
#6

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!
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)