SA-MP Forums Archive
/911 help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /911 help (/showthread.php?tid=162424)



/911 help - Kar - 23.07.2010

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;
}



Re: /911 help - Jeffry - 23.07.2010

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;
}