/hits
#9

pawn Code:
CMD:hits(playerid, params[])
{
    new string[256];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && HasHit[i] == 1)
        {

            format(string, sizeof(string), "%s~n~%s(%d)~n~", string, GetName(i), i);
            TextDrawSetString(List[playerid], string);
            TextDrawShowForPlayer(playerid, List[playerid]);
        }
    }
    return 1;
}
Haven't tested, should work though.
EDIT: You can use "HasHit[i]" instead of "HasHit[i] == 1".
+, if that doesn't still work, try using the "TextDrawShowForPlayer" OUTSIDE THE LOOP.
Example:
pawn Code:
CMD:hits(playerid, params[])
{
    new string[256];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && HasHit[i] == 1)
        {

            format(string, sizeof(string), "%s~n~%s(%d)~n~", string, GetName(i), i);
            TextDrawSetString(List[playerid], string);
        }
    }
   TextDrawShowForPlayer(playerid, List[playerid]); //outside loop!
    return 1;
}
Reply


Messages In This Thread
/hits - by AnonScripter - 02.06.2014, 16:16
Re: /hits - by DavidBilla - 02.06.2014, 16:24
Re: /hits - by alanhutch - 02.06.2014, 16:25
Re: /hits - by Rittik - 02.06.2014, 16:31
Re: /hits - by AnonScripter - 02.06.2014, 16:32
Re: /hits - by AnonScripter - 02.06.2014, 17:02
Re: /hits - by Rittik - 02.06.2014, 17:06
Re: /hits - by AnonScripter - 02.06.2014, 17:53
Re: /hits - by Kyance - 02.06.2014, 17:54
Re: /hits - by AnonScripter - 02.06.2014, 18:51

Forum Jump:


Users browsing this thread: 2 Guest(s)