SA-MP Forums Archive
changing to dialog - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: changing to dialog (/showthread.php?tid=340752)



changing to dialog - Champ - 08.05.2012

Can Anyone Change this command to dialog ↓

pawn Код:
if(strcmp(cmd, "/topkillers", true) == 0)   {
    new
        Tstring[ 128 ], First_Killer = -1, Second_Killer = -1, Third_Killer = -1, Fourth_Killer = -1, HighestKills = -9999;
        SendClientMessage(playerid,COLOR_WHITE,"Top Killers");
    foreach(Player, x )
    if( PlayerInfo[ x ][ Kills ] >= HighestKills )
    {
        HighestKills = PlayerInfo[ x ][ Kills ];
        First_Killer = x;
    }
    HighestKills = -9999;
    for( new x = 0; x < MAX_PLAYERS; x ++ )
    if( IsPlayerConnected( x ) && x != First_Killer )
    if( PlayerInfo[ x ][ Kills ] >= HighestKills )
    {
        HighestKills = PlayerInfo[ x ][ Kills ];
        Second_Killer = x;
    }
    HighestKills = -9999;
    for( new x = 0; x < MAX_PLAYERS; x ++ )
    if( IsPlayerConnected( x ) && x != First_Killer && x != Second_Killer )
    if( PlayerInfo[ x ][ Kills ] >= HighestKills )
    {
        HighestKills = PlayerInfo[ x ][ Kills ];
        Third_Killer = x;
    }
    HighestKills = -9999;
    for( new x = 0; x < MAX_PLAYERS; x ++ )
    if( IsPlayerConnected( x ) && x != First_Killer && x != Second_Killer && x != Third_Killer )
    if( PlayerInfo[ x ][ Kills ] >= HighestKills )
    {
        HighestKills = PlayerInfo[ x ][ Kills ];
        Fourth_Killer = x;
    }
    format( Tstring, sizeof( Tstring ), "Player %s (%d) - %d Kills", GetName(First_Killer ), First_Killer, PlayerInfo[ First_Killer ][ Kills ] );
    SendClientMessage( playerid, -1, Tstring );
    if( Second_Killer != -1)
    {
        format( Tstring, sizeof( Tstring ), "Player %s (%d) - %d Kills", GetName(Second_Killer ), Second_Killer, PlayerInfo[ Second_Killer ][ Kills ] );
        SendClientMessage( playerid, -1, Tstring );
    }
    if( Third_Killer != -1)
    {
        format( Tstring, sizeof( Tstring ), "Player %s (%d) - %d Kills", GetName(Third_Killer ), Third_Killer, PlayerInfo[ Third_Killer ][ Kills ] );
        SendClientMessage( playerid, -1, Tstring );
    }
    if( Fourth_Killer != -1)
    {
        format( Tstring, sizeof( Tstring ), "Player %s (%d) - %d Kills", GetName(Fourth_Killer ), Fourth_Killer, PlayerInfo[ Fourth_Killer ][ Kills ] );
        SendClientMessage( playerid, -1, Tstring );
    }
    return 1;
}



Re: changing to dialog - Mimic - 08.05.2012

I doubt anyone is going to change all of that to dialogs for you - use these
= https://sampwiki.blast.hk/wiki/OnDialogResponse
= https://sampwiki.blast.hk/wiki/ShowPlayerDialog
= https://sampwiki.blast.hk/wiki/Dialog_Styles


Re: changing to dialog - Champ - 08.05.2012

please make it