30.01.2018, 23:58
Bom galera peguei um sistema de experiкncia de xp aki no forum samp e botei no meu gm eu queria por para salva o xp de cada play
PHP код:
forward Upar(playerid);
public Upar(playerid)
{
new str[256];
XP[playerid] ++;
if(XP[playerid] == 11)
{
new Score = GetPlayerScore(playerid);
SetPlayerScore(playerid,Score+3);
XP[playerid] = 0;
format(str, sizeof(str), "{90EE90}|UP|Vocк juntou 10 experiкncias, e ganhou +2 leveis.(Score atual: %i).", GetPlayerScore(playerid));
SendClientMessage(playerid, -1, str);
PlayerPlaySound(playerid,1149,0.0,0.0,0.0), GameTextForPlayer(playerid,"~w~Level ~p~UP!",5000,6);
return false;
}
format(str, sizeof(str), "{00EE76}|EXPERIКNCIA|Vocк ganhou +1 de experiкncia! (EXP: %i/10).", XP[playerid]);
GameTextForPlayer(playerid, "~w~+1 ~p~XP", 2000, 1);
SendClientMessage(playerid, -1, str);
PlayerPlaySound(playerid,1139,0.0,0.0,0.0), GameTextForPlayer(playerid,"+1 XP",5000,6);
return true;
}
tentei bota pra salvar mas deu uns erros
exptotal,
DOF2_SetInt(String,"TotalExps", Player[playerid][exptotal]);
Player[playerid][exptotal] = DOF2_GetInt(String, "TotalExps");