02.06.2012, 06:37
Still getting the same error.
new Gate,
bool:IsOpened,
password[24] = "james";
IsOpened == false //set it's status to closed
}
public OnPlayerCommandText(playerid,cmdtext[])
if(!strcmp("/gate",cmdtext,true))
{
if(!IsPlayerInRangeOfPoint(playerid,10.0,-2433.42, 496.22, 31.03,1.00,0.00,205.00)) return SendClientMessage(playerid,-1, "You aren't near any gate!"); //replace with your gate x,y,z
if(strcmp(cmdtext) < 7) return SendClientMessage(playerid,-1,"Usage: /gate [password]");
if(strcmp(cmdtext[7],password,true)) return SendClientMessage(playerid,-1,"Wrong Password!");
switch(IsOpened)
{
case true:
{
IsOpened = false;
SendClientMessage(playerid,-1,"Gate is closing!");
MoveObject(Gate,-2433.42,496.22,31.03,1.00,0.00,205.00); //co-ordinates of closed gate
}
case false:
{
IsOpened = true;
SendClientMessage(playerid,-1,"Gate is opening!");
MoveObject(Gate,-2433.38,496.23,31.03,1.00,0.00,205.00); //co-ordinates of opened gate
}
}
return 1;
new Gate,
bool:IsOpened,
password[24] = "james";
IsOpened == false //set it's status to closed
}
public OnPlayerCommandText(playerid,cmdtext[])
if(!strcmp("/gate",cmdtext,true))
{
if(!IsPlayerInRangeOfPoint(playerid,10.0,-2433.42, 496.22, 31.03,1.00,0.00,205.00)) return SendClientMessage(playerid,-1, "You aren't near any gate!"); //replace with your gate x,y,z
if(strcmp(cmdtext) < 7) return SendClientMessage(playerid,-1,"Usage: /gate [password]");
if(strcmp(cmdtext[7],password,true)) return SendClientMessage(playerid,-1,"Wrong Password!");
switch(IsOpened)
{
case true:
{
IsOpened = false;
SendClientMessage(playerid,-1,"Gate is closing!");
MoveObject(Gate,-2433.42,496.22,31.03,1.00,0.00,205.00); //co-ordinates of closed gate
}
case false:
{
IsOpened = true;
SendClientMessage(playerid,-1,"Gate is opening!");
MoveObject(Gate,-2433.38,496.23,31.03,1.00,0.00,205.00); //co-ordinates of opened gate
}
}
return 1;