/stats dialog doesn't work -
IndependentGaming - 13.05.2015
Hello im trying to create a /stats dialog but its not working and getting a warning:
PHP код:
(3595) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Warning.
Command:
PHP код:
CMD:stats(playerid, params[])
{
new string[128];
SendClientMessageEx(playerid, TeamInfo[PlayerInfo[playerid][pTeam]][tColor], "____________________________________________________");
format(string, sizeof(string), "Name: %s | Score: %d | Kills: %d | Deaths: %d", pName(playerid), PlayerInfo[playerid][pScore], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths]);
SendClientMessageEx(playerid, COLOR_WHITE, string);
SendClientMessageEx(playerid, TeamInfo[PlayerInfo[playerid][pTeam]][tColor], "____________________________________________________");
ShowPlayerDialog(playerid,DIALOG_STATS, DIALOG_STYLE_MSGBOX, "Stats Test","Close", "");
return 1;
}
Re: /stats dialog doesn't work -
Luis- - 13.05.2015
The problem is with your dialog.
Код:
CMD:stats(playerid, params[])
{
new string[128];
SendClientMessageEx(playerid, TeamInfo[PlayerInfo[playerid][pTeam]][tColor], "____________________________________________________");
format(string, sizeof(string), "Name: %s | Score: %d | Kills: %d | Deaths: %d", pName(playerid), PlayerInfo[playerid][pScore], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths]);
SendClientMessageEx(playerid, COLOR_WHITE, string);
SendClientMessageEx(playerid, TeamInfo[PlayerInfo[playerid][pTeam]][tColor], "____________________________________________________");
ShowPlayerDialog(playerid,DIALOG_STATS, DIALOG_STYLE_MSGBOX, "Stats Test", string,"Close", "");
return 1;
}
Re: /stats dialog doesn't work -
IndependentGaming - 13.05.2015
it is working now but i got it in the chat aswel
http://gyazo.com/57b93e22a271aad409a6c921dda29e80
Re: /stats dialog doesn't work -
ZaBraNjeNi - 13.05.2015
Try with this:
Код:
CMD:stats(playerid, params[])
{
new string[128];
format(string, sizeof(string), "Name: %s | Score: %d | Kills: %d | Deaths: %d", pName(playerid), PlayerInfo[playerid][pScore], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths]);
ShowPlayerDialog(playerid,DIALOG_STATS, DIALOG_STYLE_MSGBOX, "Stats Test", string,"Close", "");
return 1;
}
Re: /stats dialog doesn't work -
Luis- - 13.05.2015
Код:
CMD:stats(playerid, params[])
{
new string[128];
format(string, sizeof(string), "Name: %s | Score: %d | Kills: %d | Deaths: %d", pName(playerid), PlayerInfo[playerid][pScore], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths]);
ShowPlayerDialog(playerid,DIALOG_STATS, DIALOG_STYLE_MSGBOX, "Stats Test", string,"Close", "");
return 1;
}
Should work perfectly.
Re: /stats dialog doesn't work -
Azula - 13.05.2015
with \n more better
PHP код:
format(string, sizeof(string), "Name: %s \n Score: %d \n Kills: %d \n Deaths: %d", pName(playerid), PlayerInfo[playerid][pScore], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths]);
Re: /stats dialog doesn't work -
Luis- - 13.05.2015
That isn't what he asked for though.
Re: /stats dialog doesn't work -
IndependentGaming - 13.05.2015
Thanks guys that was my next thing