/911 help
#1

this spams us? like 4 times

pawn Код:
CMD:911(playerid,params[])
{
    new string[128];
    if(sscanf(params,"s",string)) return SendClientMessage(playerid,red,"USAGE: /911 [text] ");
    SendClientMessage(playerid,COLOR_BLUESHADOW,"Message sent to emergency centre where it will be forwarded to the police!");
    for (new i=0; i<MAX_PLAYERS; i++) if(IsPlayerConnected(i))
    if(gTeam[playerid] == TEAM_COPS)
    {
        format(string, sizeof(string), "%s(%d) called to 911, he said: %s",string);
        CopRadio(COLOR_BLUESHADOW,"----*'.|- 911  -|.'*----");
        CopRadio(COLOR_BLUESHADOW,string);
    }
    return true;
}
Reply
#2

Try:

pawn Код:
CMD:911(playerid,params[])
{
    new string[128];
    if(sscanf(params,"s",string)) return SendClientMessage(playerid,red,"USAGE: /911 [text] ");
    SendClientMessage(playerid,COLOR_BLUESHADOW,"Message sent to emergency centre where it will be forwarded to the police!");
    for (new i=0; i<MAX_PLAYERS; i++) if(IsPlayerConnected(i))
    if(gTeam[i] == TEAM_COPS)
    {
        format(string, sizeof(string), "%s(%d) called to 911, he said: %s",string);
        CopRadio(COLOR_BLUESHADOW,"----*'.|- 911  -|.'*----");
        CopRadio(COLOR_BLUESHADOW,string);
    }
    return true;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)