Give Level All!
#1

The command does not work properly!
Код HTML:
CMD:givelevelall(playerid, params[])
{
    if(pInfo[playerid][pAdmin] < 6) return 1;
    for(new i = GetPlayerPoolSize(); i != -1; --i)
    {
        pInfo[i][pScore] += 1; VPUpdate(i, pScoreu);
        SetPlayerScore(i, pInfo[playerid][pScore]);
    }
    return 1;
}
Each player must receive one level. But it gets extra level 3-4.
On the server are around 60-70 players.
Reply
#2

Don't write SetPlayerScore again
Код:
CMD:givelevelall(playerid, params[])
{
    if(!pInfo[playerid][pAdmin] < 6) return 0;
    for(new i = GetPlayerPoolSize(); i != -1; --i)
    {
        pInfo[i][pScore] += 1; VPUpdate(i, pScoreu);

    }
    return 1;
}
Reply
#3

And then I set myself how are players score?
Reply
#4

CMD:givelevelall(playerid, params[])
{
if(pInfo[playerid][pAdmin] < 6)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
pInfo[i][pScore] += 1; VPUpdate(i, pScoreu);
SetPlayerScore(i, pInfo[playerid][pScore]);
}
}
return 1;
}


try this
Reply
#5

SetPlayerScore(i, pInfo[playerid][pScore]);
^^^ You are setting player 'i' 's score
to the one that used the cmd, as simple as that :P have fun.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)