if(strcmp(cmd, "/ra", true) == 0) { if(IsPlayerConnected(playerid)) { if(gTeam[playerid] == TEAM_LSPD || gTeam[playerid] == TEAM_FBI || gTeam[playerid] == TEAM_LSER && PlayerInfo[playerid][LAERank] >= 1) { SendClientMessage(playerid, COLOR_RED, "Identification Error - You are not a qualified Police Officer !"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /ra [text]"); return 1; { format(string, sizeof(string), "Police Radio: %s: %s, over. **", sendername, result); SendRadioMessage(5, COLOR_BLUE, string); printf("%s", string); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "%s whispers something in the radio.", sendername); ProxDetector(20.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE); return 1; } else { SendClientMessage(playerid, COLOR_RED, "Identification Error - You are not a Police Officer."); return 1; } } return 1; }
if(strcmp(cmd, "/ra", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gTeam[playerid] == TEAM_LSPD || gTeam[playerid] == TEAM_FBI || gTeam[playerid] == TEAM_LSER && PlayerInfo[playerid][LAERank] >= 1)
{
SendClientMessage(playerid, COLOR_RED, "Identification Error - You are not a qualified Police Officer !");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /ra [text]");
return 1;
}
format(string, sizeof(string), "Police Radio: %s: %s, over. **", sendername, result);
SendRadioMessage(5, COLOR_BLUE, string);
printf("%s", string);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s whispers something in the radio.", sendername);
ProxDetector(20.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE);
return 1;
}
return 1;
}
Originally Posted by MadeMan
pawn Код:
|