#1

I search a code for Expirance
I have it dont found... on ****** etc..
with textdraw "Exp : d%(points)"
can someone give me this code?
Reply
#2

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];
}
Reply
#3

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");
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)