PDA

View Full Version : Dunno what to do HELP


weedxd
16/05/2014, 03:20 PM
Oks so i did make the code and then compiled it didnt recive any errors but i get just a small log with nothin in it when i go ingame ;/

Code:
dcmd_stats(playerid,params[])
{
#pragma unused params
new statz[1024];
strcat(statz, "Score: %d\n",GetPlayerScore(playerid));
strcat(statz, "Bank: %d\n",GetPlayerBankcash(playerid));
strcat(statz, "Money: $%d\n",GetPlayerCash(playerid));
strcat(statz, "Kills: %d\n",KILLZ(playerid));
strcat(statz, "Admin: %d\n",Adminlevel(playerid));
strcat(statz, "Army: %d\n",Army(playerid));
strcat(statz, "SWAT: %d\n",SWAT(playerid));
strcat(statz, "Regular: %d\n",RegularPlayer(playerid));
strcat(statz, "TerrorLVL: %d\n",TSkill(playerid));
strcat(statz, "RobbberLVL: %d\n",GetPlayerRobSkill(playerid));
strcat(statz, "C4: %d\n",GetPlayerHasPackC4(playerid));
strcat(statz, "Rope: %d\n",GetPlayerHasPackRope(playerid));
ShowPlayerDialog(playerid,644,DIALOG_STYLE_MSGBOX,"Stats",statz,"Close","");
return true;
}


Screen:
http://i1290.photobucket.com/albums/b526/EdaEndija/bugss_zps5b7052f8.png

Ramoboss
16/05/2014, 03:23 PM
format(statz,sizeof(statz), "Score: %d\n",GetPlayerScore(playerid));

and do this for the others, it should work ;)

Konstantinos
16/05/2014, 03:24 PM
strcat is not format.


format(statz, sizeof (statz),
"Score: %d\nBank: %d\nMoney: $%d\nKills: %d\nAdmin: %d\nArmy: %d\nSWAT: %d\nRegular: %d\nTerrorLVL: %d\nRobbberLVL: %d\nC4: %d\nRope: %d",
GetPlayerScore(playerid), GetPlayerBankcash(playerid), GetPlayerCash(playerid), KILLZ(playerid), Adminlevel(playerid), Army(playerid), SWAT(playerid),
RegularPlayer(playerid), TSkill(playerid), GetPlayerRobSkill(playerid), GetPlayerHasPackC4(playerid), GetPlayerHasPackRope(playerid));

weedxd
16/05/2014, 03:36 PM
strcat is not format.


format(statz, sizeof (statz),
"Score: %d\nBank: %d\nMoney: $%d\nKills: %d\nAdmin: %d\nArmy: %d\nSWAT: %d\nRegular: %d\nTerrorLVL: %d\nRobbberLVL: %d\nC4: %d\nRope: %d",
GetPlayerScore(playerid), GetPlayerBankcash(playerid), GetPlayerCash(playerid), KILLZ(playerid), Adminlevel(playerid), Army(playerid), SWAT(playerid),
RegularPlayer(playerid), TSkill(playerid), GetPlayerRobSkill(playerid), GetPlayerHasPackC4(playerid), GetPlayerHasPackRope(playerid));


Ty +Rep :)