SA-MP Forums Archive
Clean function - 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)
+--- Thread: Clean function (/showthread.php?tid=527013)



Clean function - TheNerka - 20.07.2014

Hello, how to make public CleanAccount function. Example: registered user got from CleanAccount function items (PosX, PosY, PosZ, money too).


AW: Clean function - rospar - 20.07.2014

Sample:

Код:
enum PlayerVars{
dbid,
Name,
Score,
Money,
Skin
// etc
};
new PlayerInfo[MAX_PLAYERS][PlayerVars];
Clean the Vars:

Код:
 for(new PlayerVars:v; v < PlayerVars; v++)
{
       PlayerInfo[playerid][v] = 0;
}



Re: Clean function - TheNerka - 20.07.2014

for(new PlayerVars:v; v < PlayerVars; v++){
PlayerInfo[playerid][v] = 0;}
this code onplayerconnect or ongamemodeinit?