if (strcmp("/ogate", cmdtext, true) == 0) { if(IsPlayerInRangeOfPoint(playerid, 20, 1544.94104004,-1622.77990723,12.38281250)) { MoveObject(gate, 1544.63146973,-1631.57128906,12.38281250, 4.00); SendClientMessage(playerid, 0xFF000000, "You have successfully open the gate!"); } return 1; } if (strcmp("/cgate", cmdtext, true) == 0) { if(IsPlayerInRangeOfPoint(playerid, 20, 1544.94104004,-1622.77990723,12.38281250)) { MoveObject(gate, 1544.94104004,-1622.77990723,12.38281250, 4.00); SendClientMessage(playerid, 0xFF000000, "You have successfully closed the gate!"); } return 1; }
Код:
if (strcmp("/ogate", cmdtext, true) == 0) { if(IsPlayerInRangeOfPoint(playerid, 20, 1544.94104004,-1622.77990723,12.38281250)) { MoveObject(gate, 1544.63146973,-1631.57128906,12.38281250, 4.00); SendClientMessage(playerid, 0xFF000000, "You have successfully open the gate!"); } return 1; } if (strcmp("/cgate", cmdtext, true) == 0) { if(IsPlayerInRangeOfPoint(playerid, 20, 1544.94104004,-1622.77990723,12.38281250)) { MoveObject(gate, 1544.94104004,-1622.77990723,12.38281250, 4.00); SendClientMessage(playerid, 0xFF000000, "You have successfully closed the gate!"); } return 1; } |
if (strcmp("/ogate", cmdtext, true) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid, 20, 1544.94104004,-1622.77990723,12.38281250)) return SendClientMessage(playerid, -1, "You are not near a gate!");
MoveObject(gate, 1544.63146973,-1631.57128906,12.38281250, 4.00);
SendClientMessage(playerid, 0xFF000000, "You have successfully open the gate!");
return 1;
}
if (strcmp("/cgate", cmdtext, true) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid, 20, 1544.94104004,-1622.77990723,12.38281250)) return SendClientMessage(playerid, -1, "You are not near a gate!");
MoveObject(gate, 1544.94104004,-1622.77990723,12.38281250, 4.00);
SendClientMessage(playerid, 0xFF000000, "You have successfully closed the gate!");
return 1;
}