SA-MP Forums Archive
exp,level system problem? - 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: exp,level system problem? (/showthread.php?tid=132367)



exp,level system problem? - hardstop - 07.03.2010

how can i make that you get Xp from every kill,

and if you get like 100exp then you gain a level


Re: exp,level system problem? - Miguel - 07.03.2010

pawn Код:
new ExperiencePts[MAX_PLAYERS];
new Level[MAX_PLAYERS];
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
  ExperiencePts[killerid] ++;
  if(ExperiencePts[killerid] > 99)
  {
    SendClientMessage(killerid, COLOR, "You gain a leve for having 100 experience points!");
    Level[killerid] ++;
    ExperiencePts[killerid] = 0;
  }
  return 1;
}



Re: exp,level system problem? - Desert - 07.03.2010

Level[playerid]++; should be Level[killerid]++; The same with the message


Re: exp,level system problem? - Miguel - 07.03.2010

Updated...


Re: exp,level system problem? - hardstop - 07.03.2010

But What about saving exp? and levels?