27.10.2011, 05:25
This is my code right now.
I got no idea why it's not showing up. Also, when I do /gate it says the command doesn't exist. I have the gamemode in my Server.cfg correctly
Anyone know what I'm doing wrong?
pawn Код:
new Gate, bool:GateClose;
pawn Код:
Gate = CreateObject(971, 1588.699951, 1638.099976, 13.8, 0.0, 0.0, 0.0, 100.0);
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/gate", true)){
if(GateClose){
if(IsPlayerInRangeOfPoint(playerid, 0, 1588.699951, 1638.099976, 13.8)){
GateClose = false;
MoveObject(Gate, 1596.199951, 1638.099976, 13.8, 3.0);
SetObjectRot(Gate, 0.0, 0.0, 0.0);
return SendClientMessage(playerid, 0x00C600FF, "Gate opened");
}
}
else{
if(IsPlayerInRangeOfPoint(playerid, 0, 1588.699951, 1638.099976, 13.8)){
GateClose = true;
MoveObject(Gate, 1588.699951, 1638.099976, 13.8, 3.0);
SetObjectRot(Gate, 0.0, 0.0, 0.0);
return SendClientMessage(playerid, 0x00DC00FF, "Gate closed");
}
}
}
return 0;
}
Код:
gamemode0 grandlarc 1