Medic Radio Message problems
#9

pawn Код:
if(strcmp("/mm", cmdtext, true, 3) == 0)
{
    new string[128];
    if(IsSpawned[playerid] == 0)
    {
        SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
        return 1;
    }
    if(gTeam[playerid] == Medic)
    {
        SendClientMessage(playerid,COLOR_ROYALBLUE,"You are not a Medic!");
    }
    if(strlen(cmdtext) <= 4)
    {
        SendClientMessage(playerid,COLOR_ERROR,"USAGE: /mm [Medic Message]");
    return 1;
    }
    else
    {
        new output[255];
        new pname[24];
        GetPlayerName(playerid, pname, 24);
        strmid(output,cmdtext,3,strlen(cmdtext));
        format(string, sizeof(string), "[MEDIC RADIO] - %s (%d): %s",pname,playerid,output);
        printf("%s", string);
        for(new i=0;i<MAX_PLAYERS;i++)
        {
            if(gTeam[i] == Medic)
            {
                format(string, sizeof(string), "[MEDIC RADIO] - %s (%d): %s",pname,playerid,output);
                SendClientMessage(i,COLOR_ROYALBLUE,string);
            }
        }
    }
    return 1;
}
of course you'll get an error you blocked your loop,this will work
Reply


Messages In This Thread
Medic Radio Message problems - by Uberanwar - 21.07.2013, 03:03
Re: Medic Radio Message problems - by Don_Cage - 21.07.2013, 03:37
Re: Medic Radio Message problems - by Uberanwar - 21.07.2013, 03:41
Re: Medic Radio Message problems - by Don_Cage - 21.07.2013, 03:55
Re: Medic Radio Message problems - by PrinceKumar - 21.07.2013, 04:21
Re: Medic Radio Message problems - by Uberanwar - 21.07.2013, 04:29
Re: Medic Radio Message problems - by PrinceKumar - 21.07.2013, 04:39
Re: Medic Radio Message problems - by Uberanwar - 21.07.2013, 06:11
Re: Medic Radio Message problems - by mahdi499 - 21.07.2013, 06:35
Re: Medic Radio Message problems - by Uberanwar - 21.07.2013, 12:52

Forum Jump:


Users browsing this thread: 1 Guest(s)