Issue with my /r
#8

Quote:
Originally Posted by Jack_Leslie
Посмотреть сообщение
pawn Код:
stock GetRank(playerid)
{
    new string[126];
    switch(PlayerInfo[playerid][pRank]) // change to your rank variable
    {
        case 8: string = "Chief of Police";
        case 7: string = "Assistant Chief";
        case 6: string = "Commander";
        case 5: string = "Captain";
        case 4: string = "Lieutenant";
        case 3: string = "Sergeant";
        case 2: string = "Police Officer III";
        case 1: string = "Police Officer II";
        default: string = "Police Officer I";
        // change the name of your ranks
    }
    return string;
}

CMD:r(playerid,params[])
{
    new text[128];
    if(sscanf(params,"s",text)) return SendClientMessage(playerid,COLOR_SYNTAX,"[SYNTAX]: /r [message]");
    for(new i; i < MAX_PLAYERS; i++)
       {
        if(PlayerInfo[i][Group] == 1)
        {
            new str[128],pName[MAX_PLAYER_NAME];
            GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
            format(str,sizeof(str),"[Police Radio] %s %s: %s , Over.",GetRank(playerid),pName,text);
            SendClientMessage(i,COLOR_SYNTAX,str);
        }
    }
    return 1;
}
that Should working 99%
Reply


Messages In This Thread
Issue with my /r - by Azzeto - 16.12.2011, 10:33
Re : Issue with my /r - by BigBaws - 16.12.2011, 10:37
Re: Issue with my /r - by kizla - 16.12.2011, 10:37
Re: Issue with my /r - by Azzeto - 16.12.2011, 10:41
Re: Issue with my /r - by kizla - 16.12.2011, 10:47
Re: Issue with my /r - by PrawkC - 16.12.2011, 10:48
Re: Issue with my /r - by Jack_Leslie - 16.12.2011, 10:51
Re : Re: Issue with my /r - by BigBaws - 16.12.2011, 10:58
Re: Issue with my /r - by Azzeto - 16.12.2011, 11:00
Re: Issue with my /r - by PrawkC - 16.12.2011, 11:02
Re: Issue with my /r - by Jack_Leslie - 16.12.2011, 11:04
Re: Issue with my /r - by Azzeto - 16.12.2011, 11:10

Forum Jump:


Users browsing this thread: 1 Guest(s)