30.05.2014, 07:11
You need use player enums and then he got 200 exp his level go up, I try make code to you.
pawn Код:
#include <a_samp>
enum pInfo
{
Level,
EXP
}
new PlayerInfo[MAX_PLAYERS][pInfo];
public OnPlayerSpawn(playerid)
{
if(PlayerInfo[playerid][EXP] == 100)
{
PlayerInfo[playerid][Level] +=1;
}
if(PlayerInfo[playerid][EXP] == 200)
{
PlayerInfo[playerid][Level] +=1;
}
if(PlayerInfo[playerid][EXP] == 300)
{
PlayerInfo[playerid][Level] +=1;
}
if(PlayerInfo[playerid][EXP] == 400)
{
PlayerInfo[playerid][Level] +=1;
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
PlayerInfo[killerid][EXP] -= 1;
GivePlayerMoney(killerid, 5000);
return 1;
}