Where should i place this code...?
#1

-NVM, fixed it myself.
Now using it on OnPlayerDeath callback.
Reply
#2

How exactly does the player get their EXP stat? Doesn't show what you've used for that.
Reply
#3

i think that should be place on OnPlayerUpdate . . :\
Reply
#4

Quote:
Originally Posted by Devilxz97
Посмотреть сообщение
i think that should be place on OnPlayerUpdate . . :\
+1 I'm pretty sure you have to set it up OnPlayerUpdate, i could help you more if explain a bit on how do you exactly rank up.
Reply
#5

timer lol?
Reply
#6

Never use OnPlayerUpdate for these kind of codes what i would do is create a simple stock like

pawn Код:
stock CheckRank(playerid)
{
    if(YourXPvar >= 50) // or == depends on how your system works.
    {
         RankedUp(playerid);
         PInfo[playerid][Rank] = 1;
    }
    return 1;
}
I'm not really sure about this but i'm sure you are using the EXP when he/she gets a kill if not do the same thing when that function gets called for that, if you are using it when he/she kills someone call CheckRank(killerid) on that person that kills another player.
Reply
#7

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(PInfo[playerid][EXP] == 100 && PInfo[playerid][Rank] == 0)
    {
        RankedUp(playerid);
        PInfo[playerid][Rank] = 1;
    }
// More code...
Reply
#8

Quote:
Originally Posted by Devilxz97
Посмотреть сообщение
i think that should be place on OnPlayerUpdate . . :\
Quote:
Originally Posted by HarlemSAMP
Посмотреть сообщение
+1 I'm pretty sure you have to set it up OnPlayerUpdate, i could help you more if explain a bit on how do you exactly rank up.
You guys need to do read what i said "Using it on OnPlayerUpdate spams You Ranked Up"
Quote:
Originally Posted by Kitten
Посмотреть сообщение
Never use OnPlayerUpdate for these kind of codes
Yeah thanks, fixed it by using it OnPlayerDeath.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)