Dini - 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: Dini (
/showthread.php?tid=235233)
Dini -
Rock18 - 05.03.2011
Hey , today i've tryed to make a vip system and i don't know how to make the vip save .
This is my save code
Код:
stock
LoadPlayerVip(playerid)
{
new ppp[MAX_PLAYER_NAME];
GetPlayerName(playerid,ppp, MAX_PLAYER_NAME);
if(dini_Isset("PlayerVip.ini",ppp)) PlayerVip[playerid] = dini_Int("PlayerVip.ini",ppp);
}
//========================Save Vip=====================
stock
SavePlayerVip(playerid)
{
new ppp[MAX_PLAYER_NAME];
GetPlayerName(playerid,ppp, MAX_PLAYER_NAME);
dini_IntSet("PlayerVip.ini",ppp,PlayerVip[playerid]);
return ;
}
//========================Get Vip =====================
stock
GetPlayerVip(playerid)
{
new ppp[MAX_PLAYER_NAME];
GetPlayerName(playerid,ppp, MAX_PLAYER_NAME);
PlayerVip[playerid] =0;
return 1;
}
//========================Set Vip=====================
stock
SetPlayerVip(playerid)
{
new ppp[MAX_PLAYER_NAME];
GetPlayerName(playerid,ppp, MAX_PLAYER_NAME);
PlayerVip[playerid]=1;
return true;
}
And it save's into a PlayerVip.ini file and all player names in it .
I wanna make save in a folder like "Vips/%s.ini" and a new .ini file for every player .