04.03.2011, 21:28
pawn Код:
#define TEAM_14 14 // at the top
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/groveo", true)==0) // Command
{
if(GetPlayerTeam(playerid) != TEAM_14) return SendClientMessage(playerid, COLOR_RED, "* You're not in faction Groove Street.");
MoveObject (gate,2478.1059570313,-1695.9339599609,14.231301307678,2); // Gate (open)
SendClientMessage(playerid, COLOR_GREEN, "Gate is open!");
return 1;
}
if (strcmp(cmdtext, "/grovec", true)==0)
{
if(GetPlayerTeam(playerid) != TEAM_14) return SendClientMessage(playerid, COLOR_RED, "* You're not in faction Groove Street.");
MoveObject (gate,2473.78808594,-1691.76757812,14.23004055,2); // Gate (close)
SendClientMessage(playerid, COLOR_RED, "Gate is close!");
return 1;
}
if(!strcmp(cmdtext, "/grove", true)) // commands
{
SendClientMessage(playerid, COLOR_YELLOW, "/groveo - open");
SendClientMessage(playerid, COLOR_YELLOW, "/grovec - close");
return 1;
}
return 0;
}