SA-MP Forums Archive
+10 levels - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: +10 levels (/showthread.php?tid=114073)



+10 levels - breakpaper - 17.12.2009

How to make +10 levels?
so not that he is level 10 but then there are 10 levels + levels he have now!
this is for 1 level:
Код:
PlayerInfo[playerid][pLevel] ++;
if i do:
Код:
PlayerInfo[playerid][pLevel] +10;
it doesn' work!
if i do:
Код:
PlayerInfo[playerid][plevel] 10;
The level becomes 10, so not +10!
how to make it?


Re: +10 levels - Correlli - 17.12.2009

pawn Код:
PlayerInfo[playerid][pLevel] += 10;
or
pawn Код:
PlayerInfo[playerid][pLevel] = PlayerInfo[playerid][pLevel] + 10;



Re: +10 levels - breakpaper - 17.12.2009

If i do the first one, i get +1 level
if i do the seconds one, i get nothing!


Re: +10 levels - Correlli - 17.12.2009

Then you're not doing it correctly.


Re: +10 levels - breakpaper - 17.12.2009

This is for my IntelliNPC:
pawn Код:
if (strfind(text, "Can i get my present?") != -1)
  {
  GetPlayerPos(npcid,x,y,z);
    if(IsPlayerInRangeOfPoint(playerid,10,x,y,z))
    {
    if(IsPlayerFacingPlayer(playerid,npcid,10) == 1)
    {
    if(Presentplayer[playerid] == 0)
    {
    Presentplayer[playerid] = 1;
    GivePlayerMoney(playerid, 10000000);
    PlayerInfo[playerid][pLevel] += 10;
    SetPlayerFacingPlayer(npcid,playerid);
    SetPlayerChatBubble(npcid,"Sure, one moment!",0xFFFFFFAA,50,5000);
    amount[playerid] = 7;
    }
    else
    {
    SetPlayerFacingPlayer(npcid,playerid);
    SetPlayerChatBubble(npcid, "You have already got a present!",0xFFFFFFAA,50,5000);
    }
    }
    }
  }



Re: +10 levels - breakpaper - 17.12.2009

Please, i really need it!