ShowStats(playerid, targetid) { printf("FP3: %d", pInfo[targetid][pFPunish]); if(IsPlayerConnected(targetid)) { format(szStats, sizeof(szStats), "Rank: %d | FPunish: %d/60 | FWarn: %d/3", pInfo[targetid][pRank], pInfo[targetid][pRank], pInfo[targetid][pFPunish], pInfo[targetid][pFWarns]); SendClientMessage(playerid, 0xADADADFF, szStats); printf("FP4: %d", pInfo[targetid][pFPunish]); } return 1; }
FP3: 0 FP4: 0 (0 is right value)
Rank: 2 | FPunish: 6/60 | FWarn: 0/3
format(szStats, sizeof(szStats), "Rank: %d | FPunish: %d/60 | FWarn: %d/3", pInfo[targetid][pRank], pInfo[targetid][pFPunish], pInfo[targetid][pFWarns]);
Rank: 2 | FPunish: 2/60 | FWarn: 0/3
Duplicate pRank and now:
Код HTML:
Rank: 2 | FPunish: 2/60 | FWarn: 0/3 |
ShowStats(playerid, targetid) { printf("FP3: %d", pInfo[targetid][pFPunish]); if(IsPlayerConnected(targetid)) { format(szStats, sizeof(szStats), "Rank: %d | FPunish: %d/60 | FWarn: %d/3", pInfo[targetid][pRank], pInfo[targetid][pFPunish], pInfo[targetid][pFWarns]); SendClientMessage(playerid, 0xADADADFF, szStats); printf("FP4: %d", pInfo[targetid][pFPunish]); } return 1; }
I'm not sure what you did to get that, but I'm positive this should work:
Код:
ShowStats(playerid, targetid) { printf("FP3: %d", pInfo[targetid][pFPunish]); if(IsPlayerConnected(targetid)) { format(szStats, sizeof(szStats), "Rank: %d | FPunish: %d/60 | FWarn: %d/3", pInfo[targetid][pRank], pInfo[targetid][pFPunish], pInfo[targetid][pFWarns]); SendClientMessage(playerid, 0xADADADFF, szStats); printf("FP4: %d", pInfo[targetid][pFPunish]); } return 1; } |