Exp - 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 (
/showthread.php?tid=154298)
Exp -
[ES]Leszek_ - 13.06.2010
I search a code for Expirance
I have it dont found... on ****** etc..
with textdraw "Exp : d%(points)"
can someone give me this code?
Re: Exp -
Cameltoe - 13.06.2010
Dini:
http://forum.sa-mp.com/index.php?topic=981.0 (saving && loading from flatfiles)
Dini how to:
http://forum.sa-mp.com/index.php?topic=4798.0
Код:
//create VAR
new Exp[MAX_PLAYERS];
//Save VAR to flatfile
dini_IntSet(cfile, "Exp", GetPlayerExp(playerid));
// GetPlayerExp
stock GetPlayerExp(playerid)
{
return Exp[playerid];
}
// SetPlayerExp
stock SetPlayerExp(playerid,cash)
{
Exp[playerid] = cash;
return Exp[playerid];
}
Re: Exp -
Dark_Kostas - 13.06.2010
Get rid of this new Exp[MAX_PLAYERS]; and use PVars
pawn Код:
//GetPlayerExp
stock GetPlayerExp(playerid)
{
return GetPVarInt(playerid, "EXP");
}
//SetPlayerExp
stock SetPlayerExp(playerid,cash)
{
SetPVarInt(playerid, "EXP", cash);
return GetPVarInt(playerid, "EXP");
}