04.08.2009, 20:59
Hi My script is setup like this:
#include <Object>
#include <IsPlayerLAdmin>
new evevator;
new isopened4;
public OnFilterScriptInit()
{
elevator = CreateStreamedObject(3095, -294.865967, 1866.683960, 41.285698, 0.0000, 0.0000, 34.3775);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(up, 2, cmdtext);
dcmd(down, 4, cmdtext);
return 1;
}
dcmd_up(playerid,params[])
{
#pragma unused params
if(isopened4 == 0)
{
MoveObject(elevator, -294.865967, 1866.683960, 150.285698, 5.00 );
SendClientMessage(playerid, 0xFF0000AA, "Elevator Rising");
isopened4 = 1;
}
else SendClientMessage(playerid, 0xFF0000AA, "Elevator Already Up!");
return 1;
}
dcmd_down(playerid,params[])
{
#pragma unused params
if(isopened4 == 1)
{
MoveObject(elevator, -294.865967, 1866.683960, 41.285698, 10.00 );
SendClientMessage(playerid, 0xFF0000AA, "Elevator Lowering");
isopened4 = 0;
}
else SendClientMessage(playerid, 0xFF0000AA, "Elevator Already Down!");
return 1;
}
How can I make it so it says ERROR: Elevator is already moving please wait. because people like to kill people by doing /up down up.
#include <Object>
#include <IsPlayerLAdmin>
new evevator;
new isopened4;
public OnFilterScriptInit()
{
elevator = CreateStreamedObject(3095, -294.865967, 1866.683960, 41.285698, 0.0000, 0.0000, 34.3775);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(up, 2, cmdtext);
dcmd(down, 4, cmdtext);
return 1;
}
dcmd_up(playerid,params[])
{
#pragma unused params
if(isopened4 == 0)
{
MoveObject(elevator, -294.865967, 1866.683960, 150.285698, 5.00 );
SendClientMessage(playerid, 0xFF0000AA, "Elevator Rising");
isopened4 = 1;
}
else SendClientMessage(playerid, 0xFF0000AA, "Elevator Already Up!");
return 1;
}
dcmd_down(playerid,params[])
{
#pragma unused params
if(isopened4 == 1)
{
MoveObject(elevator, -294.865967, 1866.683960, 41.285698, 10.00 );
SendClientMessage(playerid, 0xFF0000AA, "Elevator Lowering");
isopened4 = 0;
}
else SendClientMessage(playerid, 0xFF0000AA, "Elevator Already Down!");
return 1;
}
How can I make it so it says ERROR: Elevator is already moving please wait. because people like to kill people by doing /up down up.