Unnamed
public text v1 · immutable if(strcmp(cmd, "/pchat", true) == 0)
{
tmp = strtok(cmdtext, idx, strlen(cmdtext));
if (!strlen(tmp))
{
SendClientMessage(playerid, COLOR_ORANGE, "Usage: /pchat [message]");
return 1; }
}
for (new i = 0; i <MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if (Police[i] == 1)
{
GetPlayerName(playerid, sendername, 24);
format(string, sizeof(string), "Police Chat - %s: %s", sendername, tmp);
SendClientMessage(i, COLOR_LIGHTBLUE, string);
}
}
return 1;
}