Dunno what to do HELP
#1

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:
PHP код:
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:
Reply
#2

pawn Код:
format(statz,sizeof(statz), "Score: %d\n",GetPlayerScore(playerid));
and do this for the others, it should work
Reply
#3

strcat is not format.

pawn Код:
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));
Reply
#4

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
strcat is not format.

pawn Код:
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)