07.01.2011, 22:34
On the top of your script add something like:
and
Under OnPlayerConnect, add this on top:
Then, under onplayerconnect do:
You should also use this method for getting other things from DINI, just add the pVar's you'll use to the enum and remember to set their value to the value in their userfile under onplayerconnect, or after they've logged in, etc, depending on your script.
pawn Код:
enum pInfo
{
Banned
}
pawn Код:
new PlayerInfo[MAX_PLAYERS][pInfo];
pawn Код:
PlayerInfo[playerid][Banned] = dini_Int(file, "Banned");
pawn Код:
if(PlayerInfo[playerid][Banned] == 1)
{
//Enter what to do if player is banned here
}