18.05.2012, 16:26
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][mAdmin] = DOF2_GetInt(arquivo, "Admin");
GivePlayerMoney(playerid, DOF2_GetInt(arquivo, "Dinheiro"));
PlayerInfo[playerid][mAvisos] = DOF2_GetInt(arquivo, "Avisos");
PlayerInfo[playerid][mVip] = DOF2_GetInt(arquivo, "Vip");
if(getdate() - 30 > DOF2_GetInt(arquivo,"Vip")) PlayerInfo[playerid][mVip] = 0;
return 1;
}
pawn Код:
CMD:darvip(playerid, params[])
{
new id;
if(sscanf(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 ,"VipDias", getdate());
PlayerInfo[id][mVip] = 1;
GivePlayerMoney(id, 50000);
}
return 1;
}
pawn Код:
Admin = 5
Dinheiro = 210123
Vip = 1
Avisos = 0
VipDias = 139