public OnPlayerCommandText(playerid, cmdtext[]) // OnPlayerCommandText
{
if(!strcmp(cmdtext, "/me", true, 3)) // The command itself.
{
if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "Correct ussage: /me [action]"); // If the player just types /me and no action.
new str[128]; // String
GetPlayerName(playerid, str, sizeof(str)); // Gets the player name for /me
format(str, sizeof(str), "* %s %s", str, cmdtext[4]); // What it's going to look like.
SendClientMessageToAll(0xFF9900AA, str); // Color to send the message to everyone in.
return 1;
}
if(strcmp(cmdtext, "/ogate2", true) == 0)
{
MoveObject(gate1, 745.61755371094, -2395.0322265625, 15.107341766357, 2.0);
SendClientMessage(playerid, COLOR_GREEN, "Gate 2 has been opened");
return 1;
}
if(strcmp(cmdtext, "/ogate3", true) == 0)
{
MoveObject(gate2, 770.44696044922, -2411.9133300781, 15.461982727051, 2.0);
SendClientMessage(playerid, COLOR_GREEN, "Gate 3 has been opened");
return 1;
}
if(strcmp(cmdtext, "/ogate1", true) == 0)
{
MoveObject(gate3, 1003.3813476563, -2305.5224609375, 14.867141723633, 2.0);
SendClientMessage(playerid, COLOR_GREEN, "Gate 1 has been opened 'welcome To The Jail'");
return 1;
}
if(strcmp(cmdtext, "/cgate2", true) == 0)
{
MoveObject(gate1, 756.26232910156, -2392.1733398438, 15.107341766357, 2.0);
SendClientMessage(playerid, COLOR_GREEN, "Gate 2 has been closed");
return 1;
}
if(strcmp(cmdtext, "/cgate3", true) == 0)
{
MoveObject(gate2, 760.15753173828, -2415.0886230469, 15.130363464355, 2.0);
SendClientMessage(playerid, COLOR_GREEN, "Gate 3 has been closed");
return 1;
}
if(strcmp(cmdtext, "/cgate1", true) == 0)
{
MoveObject(gate3, 1006.1548461914, -2317.0842285156, 14.981994628906, 2.0);
SendClientMessage(playerid, COLOR_GREEN, "Gate 1 has been closed");
return 1;
}
if(strcmp(cmdtext, "/ocell", true) == 0)
{
MoveObject(cell1, 777.69183349609, -2423.8305664063, 12.350757598877, 2.0);
SendClientMessage(playerid, COLOR_GREEN, " Cell Has Been Opened");
return 1;
}
if(strcmp(cmdtext, "/ccell", true) == 0)
{
MoveObject(cell1, 775.6142578125, -2416.0493164063, 12.350757598877, 2.0);
SendClientMessage(playerid, COLOR_GREEN, " Cell Has Been Closed");
return 1;
}
return 0;
}