Stats Dialog Problem
#1

Cmd: Stats
Codes:
Code:
CMD:stats(playerid,params[]) {
	new string[256], pDeaths, player1, h, m, s,playername[MAX_PLAYER_NAME],dialog[99];
	if(isnull(params)) player1 = playerid;
	else player1 = strval(params);
            new nxtlevel = PlayerInfo[playerid][pLevel]+1; // As soon as its executed, It adds +1 to your score.
    		new expamount = nxtlevel*levelexp; // Exp amount, Its 2 CURRENTLY but you can raise it by adding +number after levelexp
	if(IsPlayerConnected(player1)) {
	    TotalGameTime(player1, h, m, s);
	    GetPlayerName(player1, playername, sizeof(playername));
 		if(PlayerInfo[player1][Deaths] == 0) pDeaths = 1; else pDeaths = PlayerInfo[player1][Deaths];




        format(string,sizeof(string),"{FF0000}|-|   Vaziat %s    |-|\n{C7CDA0} \nSath: %d\n \nTajrobe: %d/%d\n \nTeam %s\n \nClass %s\n \nKoshteha: %d\n \nMordeHa: %d\n \nSekke: %d\n \nDarsade K/M: %0.2f\n \nPool: $%d\n \nZaman Bazi: %d Saat %d Daghighe %d Sanie\n \nTedad Kif Hai Taghir Giafe: %d\n \nSabadKala: %d"
		,playername, GetPlayerScore(player1), PlayerInfo[playerid][pExp],expamount,GetTeamName(player1),GetClass(player1),PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths],PlayerInfo[player1][pSekke], Float:PlayerInfo[player1][Kills]/Float:pDeaths, GetPlayerMoney(player1),  h, m, s,PlayerTgh[player1], PlayerInfo[player1][pSabadKala]);
		strcat(dialog,string);
		
		if(PlayerInfo[player1][Helper] >= 1)
		{
 		format(string,sizeof(string),"{FF0000}|-|   Vaziat %s    |-|\n{C7CDA0} \nSath: %d\n \nTajrobe: %d/%d\n \nTeam %s\n \nClass %s\n \nKoshteha: %d\n \nMordeHa: %d\n \nSekke: %d\n \nDarsade K/M: %0.2f\n \nPool: $%d\n \nAdmin Level: %d\n \nKarmand %s\n \nZaman Bazi: %d Saat %d Daghighe %d Sanie\n \nTedad Kif Hai Taghir Giafe: %d\n \nSabadKala: %d"
		,playername, GetPlayerScore(player1), PlayerInfo[playerid][pExp],expamount,GetTeamName(player1),GetClass(player1),PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths],PlayerInfo[player1][pSekke], Float:PlayerInfo[player1][Kills]/Float:pDeaths, GetPlayerMoney(player1), GetKarmandName(player1), h, m, s,PlayerTgh[player1], PlayerInfo[player1][pSabadKala]);
		strcat(dialog,string);
		}
		if(PlayerInfo[player1][dRank] >= 1)
		{
  		format(string,sizeof(string),"{FF0000}|-|   Vaziat %s    |-|\n{C7CDA0} \nSath: %d\n \nTajrobe: %d/%d\n \nTeam %s\n \nClass %s\n \nKoshteha: %d\n \nMordeHa: %d\n \nSekke: %d\n \nDarsade K/M: %0.2f\n \nPool: $%d\n \nVip %s\n \nZaman Bazi: %d Saat %d Daghighe %d Sanie\n \nTedad Kif Hai Taghir Giafe: %d\n \nSabadKala: %d"
		,playername, GetPlayerScore(player1), PlayerInfo[playerid][pExp],expamount,GetTeamName(player1),GetClass(player1),PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths],PlayerInfo[player1][pSekke], Float:PlayerInfo[player1][Kills]/Float:pDeaths, GetPlayerMoney(player1),  GetVipName(player1), h, m, s,PlayerTgh[player1], PlayerInfo[player1][pSabadKala]);
		strcat(dialog,string);
		}
 		if(PlayerInfo[player1][Level] >= 1 || PlayerInfo[player1][pAdminPoli] >= 1)
		{
  		format(string,sizeof(string),"{FF0000}|-|   Vaziat %s    |-|\n{C7CDA0} \nSath: %d\n \nTajrobe: %d/%d\n \nTeam %s\n \nClass %s\n \nKoshteha: %d\n \nMordeHa: %d\n \nSekke: %d\n \nDarsade K/M: %0.2f\n \nPool: $%d\n \n%s\n \nZaman Bazi: %d Saat %d Daghighe %d Sanie\n \nTedad Kif Hai Taghir Giafe: %d\n \nSabadKala: %d"
		,playername, GetPlayerScore(player1), PlayerInfo[playerid][pExp],expamount,GetTeamName(player1),PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths],PlayerInfo[player1][pSekke], Float:PlayerInfo[player1][Kills]/Float:pDeaths, GetPlayerMoney(player1), GetLvlName(player1), h, m, s,PlayerTgh[player1], PlayerInfo[player1][pSabadKala]);
		strcat(dialog,string);
		}
		if(PlayerInfo[player1][dRank] >= 1 && PlayerInfo[player1][Helper] >= 1)
		{
		
  		format(string,sizeof(string),"{FF0000}|-|   Vaziat %s    |-|\n{C7CDA0} \nSath: %d\n \nTajrobe: %d/%d\n \nTeam %s\n \nClass %s\n \nKoshteha: %d\n \nMordeHa: %d\n \nSekke: %d\n \nDarsade K/M: %0.2f\n \nPool: $%d\n \nVip %s\n \nKarmand %s\n \nZaman Bazi: %d Saat %d Daghighe %d Sanie\n \nTedad Kif Hai Taghir Giafe: %d\n \nSabadKala: %d"
		,playername, GetPlayerScore(player1), PlayerInfo[playerid][pExp],expamount,GetTeamName(player1),GetClass(player1),PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths],PlayerInfo[player1][pSekke], Float:PlayerInfo[player1][Kills]/Float:pDeaths, GetPlayerMoney(player1), GetVipName(player1), GetKarmandName(player1), h, m, s,PlayerTgh[player1], PlayerInfo[player1][pSabadKala]);
		strcat(dialog,string);
		}




		return ShowPlayerDialog(playerid, 72,DIALOG_STYLE_MSGBOX,"{FFFF00}Vaziat Bazikon",string,"Bashe","");
	} else return SendClientMessage(playerid, COLOR_RED, "In Bazikon Yaft Nashod!");
}
Bug Line Dialogs:


How to fix??!
Please helpme..
Reply
#2

instead
new string[1000];
Reply
#3

change dialog[99] to dialog[256]
Reply
#4

Did not change
Reply
#5

you try to change what i said
Reply
#6

not working
i changed string to 1000 and dialog to 256
Reply
#7

what is the error ?
Reply
#8

Quote:
Originally Posted by Florin48
View Post
what is the error ?
I do not get any error while compiling, but dialog status
Bad lines are written!
Reply
#9

try:

Code:
CMD:stats(playerid,params[]) {
	new string[256], pDeaths, player1, h, m, s,playername[MAX_PLAYER_NAME],dialog[99];
	if(isnull(params)) player1 = playerid;
	else player1 = strval(params);
            new nxtlevel = PlayerInfo[playerid][pLevel]+1; // As soon as its executed, It adds +1 to your score.
    		new expamount = nxtlevel*levelexp; // Exp amount, Its 2 CURRENTLY but you can raise it by adding +number after levelexp
	if(IsPlayerConnected(player1)) {
	    TotalGameTime(player1, h, m, s);
	    GetPlayerName(player1, playername, sizeof(playername));
 		if(PlayerInfo[player1][Deaths] == 0) pDeaths = 1; else pDeaths = PlayerInfo[player1][Deaths];




        format(string,sizeof(string),"{FF0000}|-|   Vaziat %s    |-|\n{C7CDA0} \nSath: %d\n \nTajrobe: %d/%d\n \nTeam %s\n \nClass %s\n \nKoshteha: %d\n \nMordeHa: %d\n \nSekke: %d\n \nDarsade K/M: %0.2f\n \nPool: %d\n \nZaman Bazi: %d Saat %d Daghighe %d Sanie\n \nTedad Kif Hai Taghir Giafe: %d\n \nSabadKala: %d"
		,playername, GetPlayerScore(player1), PlayerInfo[playerid][pExp],expamount,GetTeamName(player1),GetClass(player1),PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths],PlayerInfo[player1][pSekke], Float:PlayerInfo[player1][Kills]/Float:pDeaths, GetPlayerMoney(player1),  h, m, s,PlayerTgh[player1], PlayerInfo[player1][pSabadKala]);
		strcat(dialog,string);

		if(PlayerInfo[player1][Helper] >= 1)
		{
 		format(string,sizeof(string),"{FF0000}|-|   Vaziat %s    |-|\n{C7CDA0} \nSath: %d\n \nTajrobe: %d/%d\n \nTeam %s\n \nClass %s\n \nKoshteha: %d\n \nMordeHa: %d\n \nSekke: %d\n \nDarsade K/M: %0.2f\n \nPool: %d\n \nAdmin Level: %d\n \nKarmand %s\n \nZaman Bazi: %d Saat %d Daghighe %d Sanie\n \nTedad Kif Hai Taghir Giafe: %d\n \nSabadKala: %d"
		,playername, GetPlayerScore(player1), PlayerInfo[playerid][pExp],expamount,GetTeamName(player1),GetClass(player1),PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths],PlayerInfo[player1][pSekke], Float:PlayerInfo[player1][Kills]/Float:pDeaths, GetPlayerMoney(player1), GetKarmandName(player1), h, m, s,PlayerTgh[player1], PlayerInfo[player1][pSabadKala]);
		strcat(dialog,string);
		}
		if(PlayerInfo[player1][dRank] >= 1)
		{
  		format(string,sizeof(string),"{FF0000}|-|   Vaziat %s    |-|\n{C7CDA0} \nSath: %d\n \nTajrobe: %d/%d\n \nTeam %s\n \nClass %s\n \nKoshteha: %d\n \nMordeHa: %d\n \nSekke: %d\n \nDarsade K/M: %0.2f\n \nPool: %d\n \nVip %s\n \nZaman Bazi: %d Saat %d Daghighe %d Sanie\n \nTedad Kif Hai Taghir Giafe: %d\n \nSabadKala: %d"
		,playername, GetPlayerScore(player1), PlayerInfo[playerid][pExp],expamount,GetTeamName(player1),GetClass(player1),PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths],PlayerInfo[player1][pSekke], Float:PlayerInfo[player1][Kills]/Float:pDeaths, GetPlayerMoney(player1),  GetVipName(player1), h, m, s,PlayerTgh[player1], PlayerInfo[player1][pSabadKala]);
		strcat(dialog,string);
		}
 		if(PlayerInfo[player1][Level] >= 1 || PlayerInfo[player1][pAdminPoli] >= 1)
		{
  		format(string,sizeof(string),"{FF0000}|-|   Vaziat %s    |-|\n{C7CDA0} \nSath: %d\n \nTajrobe: %d/%d\n \nTeam %s\n \nClass %s\n \nKoshteha: %d\n \nMordeHa: %d\n \nSekke: %d\n \nDarsade K/M: %0.2f\n \nPool: %d\n \n%s\n \nZaman Bazi: %d Saat %d Daghighe %d Sanie\n \nTedad Kif Hai Taghir Giafe: %d\n \nSabadKala: %d"
		,playername, GetPlayerScore(player1), PlayerInfo[playerid][pExp],expamount,GetTeamName(player1),PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths],PlayerInfo[player1][pSekke], Float:PlayerInfo[player1][Kills]/Float:pDeaths, GetPlayerMoney(player1), GetLvlName(player1), h, m, s,PlayerTgh[player1], PlayerInfo[player1][pSabadKala]);
		strcat(dialog,string);
		}
		if(PlayerInfo[player1][dRank] >= 1 && PlayerInfo[player1][Helper] >= 1)
		{

  		format(string,sizeof(string),"{FF0000}|-|   Vaziat %s    |-|\n{C7CDA0} \nSath: %d\n \nTajrobe: %d/%d\n \nTeam %s\n \nClass %s\n \nKoshteha: %d\n \nMordeHa: %d\n \nSekke: %d\n \nDarsade K/M: %0.2f\n \nPool: %d\n \nVip %s\n \nKarmand %s\n \nZaman Bazi: %d Saat %d Daghighe %d Sanie\n \nTedad Kif Hai Taghir Giafe: %d\n \nSabadKala: %d"
		,playername, GetPlayerScore(player1), PlayerInfo[playerid][pExp],expamount,GetTeamName(player1),GetClass(player1),PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths],PlayerInfo[player1][pSekke], Float:PlayerInfo[player1][Kills]/Float:pDeaths, GetPlayerMoney(player1), GetVipName(player1), GetKarmandName(player1), h, m, s,PlayerTgh[player1], PlayerInfo[player1][pSabadKala]);
		strcat(dialog,string);
		}




		return ShowPlayerDialog(playerid, 72,DIALOG_STYLE_MSGBOX,"{FFFF00}Vaziat Bazikon",string,"Bashe","");
	} else return SendClientMessage(playerid, COLOR_RED, "In Bazikon Yaft Nashod!");
}
Reply
#10

please help me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)