Need This Card [+rep]
#1

i saw a score card in a server that have gamemode changing system and i have also gamemode changing system but i need a score card like this. i saw in another server



when gm restarts it will gives the result of players..

thanks.
Reply
#2

Before using "SendRconCommand("gmx")" Display a dialog that displays the player stats (stored in variables) using a loop.
Reply
#3

please can you make the textdraw given above ?
i don't know gmx but i have this ↓

pawn Код:
public GameModeExitFunc(playerid) {
    SendRconCommand("changemode GM2");
    GameTextForAll("~y~Changing Game ~n~ ~w~Please Wait....",5000,1);
    for(new i;i<15;++i)
    {
        SendClientMessageToAll(COLOR_Soldiers,"  ");
    }
    KillTimer(GameTimer);
    TextDrawHideForPlayer(playerid,Textdraw0);
    TextDrawDestroy(text_Top5[0]);
    TextDrawDestroy(text_Top5[1]);

     }
make this textdraw in this script

thanks
Reply
#4

this is not the textdraw.. . . . It dialog in pic
Reply
#5

oh sorry dialog... create it please in the script given above
Reply
#6

have you ever tryed to do it yourself or searched it on forum ?
Reply
#7

Here is an example:

pawn Код:
enum sInfo // create an enum to store the server's information
{
    mostKills,
    mostKillsPlayer[MAX_PLAYER_NAME],
    mostDeaths,
    mostDeathsPlayer[MAX_PLAYER_NAME],
};

new ServerInfo[sInfo];

enum pInfo // create an enum to store the player's information
{
    Kills,
    Deaths,
};

new PlayerInfo[MAX_PLAYERS][pInfo];

public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID)
    {
        PlayerInfo[killerid][Kills]++; // increase the killerid's kills
        if(PlayerInfo[killerid][Kills] > ServerInfo[mostKills]) // check if the killerid's total kills are greater than the server's maxKills
        { // if they are proceed
            new pName[MAX_PLAYER_NAME]; //create a string to store the player's name
            ServerInfo[mostKills] = PlayerInfo[playerid][Kills]; //update the server's info with the new maxKills
            GetPlayerName(killerid, pName, MAX_PLAYER_NAME); //get the player's name
            ServerInfo[mostKillsPlayer] = pName; //store the player's name to the mostKillsPlayer variable
        }
    }

    //same thing with the deaths
    PlayerInfo[playerid][Deaths]++;
    if(PlayerInfo[playerid][Deaths] > ServerInfo[mostDeaths])
    {
        new pName[MAX_PLAYER_NAME];
        ServerInfo[mostDeaths] = PlayerInfo[playerid][Deaths];
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        ServerInfo[mostDeathsPlayer] = pName;
    }
    return 1;
}

public GameModeExitFunc(playerid)
{
    GameTextForAll("~y~Changing Game ~n~ ~w~Please Wait....",5000,1);
    for(new i;i<15;++i)
    {
        SendClientMessageToAll(COLOR_Soldiers,"  ");
    }
    KillTimer(GameTimer);
    TextDrawHideForPlayer(playerid,Textdraw0);
    TextDrawDestroy(text_Top5[0]);
    TextDrawDestroy(text_Top5[1]);
    new str[200]; //create a string to format
    format(str, sizeof(str), "Most Kills: %i\nMost Kills Player: %s\nMost Deaths: %i\nMost Deaths Player: %s", ServerInfo[mostKills], ServerInfo[mostKillsPlayer], ServerInfo[mostDeaths], ServerInfo[mostDeathsPlayer])
    // ^ format the string with the information required
    for(new i = 0; i <= GetMaxPlayers(); i++) // loop through all connected players
    {
        if(IsPlayerConnected(i))
        {
            ShowPlayerDialog(i, 385, DIALOG_STYLE_LIST, "Match results", str, "Close" ""); //show the dialog to every connected player
        }
    }
    SendRconCommand("changemode GM2"); // change the game mode

}
I hope you understand it because it took me some time to finish
Reply
#8

i think i will give some errors can you give me .pwn file by uploading on solidfiles ?
Reply
#9

any one other please...
please post .pwn file
Reply
#10

I'll try... Check your Pm.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)