17.05.2012, 23:49
pawn Код:
CMD:darvip(playerid, params[])
{
new id;
if(ssanf(params,"d", id)) return SendClientMessage(playerid, BRANCO,"[INFO]: /darvip [playerid]");
{
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, VERMELHO, "[INFO]: Jogador invбlido!");
new Year, Month, Day;
getdate(Year, Month, Day);
new arquivo[34], playername[MAX_PLAYER_NAME];
GetPlayerName(id, playername, sizeof(playername));
format(arquivo, sizeof(arquivo), "Contas/%s.ini", playername);
DOF2_SetInt(arquivo ,"Vip", getdate());
PlayerInfo[id][mVip] = 1;
}
return 1;
}
pawn Код:
public OnPlayerConnect(playerid)
{
new arquivo[34], playername[MAX_PLAYER_NAME]; //
GetPlayerName(playerid, playername, sizeof(playername));
format(arquivo, sizeof(arquivo), "Contas/%s.ini", playername);
PlayerInfo[playerid][mVip] = DOF2_GetInt(arquivo, "Vip");
if(getdate() - 30 > DOF2_GetInt(arquivo,"Vip"))
PlayerInfo[playerid][mVip] == 0;
return 1;
}