14.12.2013, 02:04
Testa algo assim para ver, nem testei to morto de sono.
pawn Код:
if(strcmp(cmd, "/comprarvip", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new money = GetPlayerMoney(playerid);
if(money >= 10000)
{
GivePlayerMoney(playerid, -10000);
PlayerInfo[playerid][pVIP] = 1;
new year, month, day, hour,minute,second;
getdate(year, month, day);
gettime(hour,minute,second);
PlayerInfo[playerid][pTimeVIP] = 0;
PlayerInfo[playerid][pDiaVIP] = day;
PlayerInfo[playerid][pMesVIP] = month+30;
PlayerInfo[playerid][pAnoVIP] = year;
if(PlayerInfo[playerid][pMesVIP] > 12)
{
PlayerInfo[playerid][pMesVIP] -= 12;
PlayerInfo[playerid][pAnoVIP]++;
}
OnPlayerUpdate(playerid);
}
}
return 1;
}