Sending name problem
#1

It's not sending any name that has the most kills.
pawn Code:
forward TimeUp(playerid,notify);
public TimeUp(playerid,notify)
{
    new player;
    if(notify == 1)
    {
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(gKills[i] > gKills[playerid]) player = i;
    }
    GetPlayerName(player, gPlayerName, sizeof(gPlayerName));
    format(str, sizeof(str), "%s has won the match with the most kills.",player);
    Sendclientmessagetoall..........
        }
    return 1;
}
Reply
#2

You put the name into gPlayerName and then try to read it from player. You also need to use gPlayerName in the format

pawn Code:
GetPlayerName(player, gPlayerName, sizeof(gPlayerName));
format(str, sizeof(str), "%s has won the match with the most kills.",gPlayerName);
Reply
#3

Ofcourse, fail xd
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)