04.08.2010, 13:02
(
Последний раз редактировалось Ash.; 04.08.2010 в 13:07.
Причина: Forgot something in PAWN Script
)
Quote:
but isnt there a way to combine open and close? i know how to make the seperate commands.
|
EDIT: Forgot to add in the create object - but you know how to do it
pawn Код:
new GateStat;
GateStat = 0;
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/gatethingblah", cmdtext) == 0)
{
if(GateStat = 0) //If gate is closed
{
GateStat = 1; //Gate = Open
MoveObject(blah, blah); //To open
return 1;
}
else if(GateStat = 1) //If gate is open
{
GateStat = 0; //Gate = Closed
MoveObject(blah, blah); //To closed
return 1;
}
}
return 0;
}
I havent tested it, its just something i thought of - i use it for stepping's of checkpoints on my new script and it works like a beauty