What happens?
#1

Fpunish problem!
Код HTML:
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;
}
Код HTML:
FP3: 0
FP4: 0 
(0 is right value)
ShowStats In Game:
Код HTML:
Rank: 2 | FPunish: 6/60 | FWarn: 0/3
FPunish is 0, not 6.
Reply
#2

Код:
format(szStats, sizeof(szStats), "Rank: %d | FPunish: %d/60 | FWarn: %d/3", pInfo[targetid][pRank], pInfo[targetid][pFPunish], pInfo[targetid][pFWarns]);
duplicate 'pInfo[targetid][pRank]'
Reply
#3

Duplicate pRank and now:
Код HTML:
Rank: 2 | FPunish: 2/60 | FWarn: 0/3
Reply
#4

My problem is similar to this: https://sampforum.blast.hk/showthread.php?tid=573211
I reset the variables 0 to OnPlayerConnect but still not work!
Reply
#5

Quote:
Originally Posted by norton2
Посмотреть сообщение
Duplicate pRank and now:
Код HTML:
Rank: 2 | FPunish: 2/60 | FWarn: 0/3
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;
}
Reply
#6

Quote:
Originally Posted by Bartels
Посмотреть сообщение
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;
}
Thanks you man!! +1 REP!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)