if(strcmp(cmd, "/darvip", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] < DONO) { SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo estб autorizado a usar este comando!"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USE: /darvip [id] [Meses]"); return 1; } new para1; new level; new meses; new cash = GetPlayerMoney(playerid); para1 = ReturnUser(tmp); tmp = strtok(cmdtext, idx); meses = strval(tmp); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USE: /darvip [id] [Meses]"); return 1; } level = strval(tmp); GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); if(IsPlayerConnected(para1)) { if(para1 != INVALID_PLAYER_ID) { if(level < 1)return SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк nгo pode definir para 0 meses!"); format(string, sizeof string, "Vocк deu %d meses de Vip Premium para %s", level, giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "[CPB-RPG]Seu VIP Premium foi ativado e seus %d lhe foram entregue (De %d Para %d).",3000000*meses, cash, cash + 3000000*meses); SendClientMessage(para1, COLOR_YELLOW, string); format(string, sizeof(string), "%s deu vip premium ao %s (%d/%d/%d - %d:%d)",sendername,giveplayer,day, month, year,hour, minute); VipsLog(string); GivePlayerMoney(para1, 3000000*meses); PlayerInfo[para1][pVIP] = 1; PlayerInfo[para1][pDiaVIP] = day; PlayerInfo[para1][pHoraVIP] = hour + 1; PlayerInfo[para1][pMesVIP] = month+level; PlayerInfo[para1][pAnoVIP] = year; if(PlayerInfo[para1][pMesVIP] > 12) { PlayerInfo[para1][pMesVIP] -= 12; PlayerInfo[para1][pAnoVIP]++; } format(string, sizeof(string), "O vencimento do seu VIP Premium й: %d/%d/%d (dd/mm/aaaa) бs %d hora(s).",PlayerInfo[para1][pDiaVIP], PlayerInfo[para1][pMesVIP], PlayerInfo[para1][pAnoVIP], PlayerInfo[para1][pHoraVIP]); SendClientMessage(para1, COLOR_YELLOW, string); } OnPlayerSave(para1); } } return 1; }
new Str[30]; format(Str, sizeof Str, "%s.ini", giveplayer); if(fexist(Str)) { //se o arquivo do player existir } else { //se o arquivo do player nгo existir }
PlayerInfo[para1][pVIP] = 1; PlayerInfo[para1][pDiaVIP] = day; PlayerInfo[para1][pHoraVIP] = hour + 1; PlayerInfo[para1][pMesVIP] = month+level; PlayerInfo[para1][pAnoVIP] = year; if(PlayerInfo[para1][pMesVIP] > 12) { PlayerInfo[para1][pMesVIP] -= 12; PlayerInfo[para1][pAnoVIP]++; } format(string, sizeof(string), "O vencimento do seu VIP Premium й: %d/%d/%d (dd/mm/aaaa) бs %d hora(s).",PlayerInfo[para1][pDiaVIP], PlayerInfo[para1][pMesVIP], PlayerInfo[para1][pAnoVIP], PlayerInfo[para1][pHoraVIP]); SendClientMessage(para1, COLOR_YELLOW, string);
enum pInfo{ pKey[128], pLevel, pDiaVIP, pHoraVIP, pMesVIP, pAnoVIP, pAdmin, pHelper, pVIP, pCidadania, pGrampo, gPupgrade, pConnectTime, pReg, pSex, pAge, pMuted, pAgendado, pTempoAgendado, pAdminAgendou[64], pMotivoAgendou[128], pSequestrado, pExp, pCash, pConta, pCrimes, pKills, pDeaths, pPhoneBook, pLottoNr, pFishes, pBiggestFish, pEmprego, pSalario, pHeadValue, pHeadValueT, pJailed, pJailTime, pMats, pDrogas, pDrogas2, pDrogas3, pLider, pMembro, pCargo, pSkin, pContractTime, pDetSkill, pSexSkill, pBoxSkill, pLawSkill, pMechSkill, pNewsSkill, pDrogasSkill, pCookSkill, pFishSkill, Float:pSHealth, pInt, pCapacete, pLocal, pTeam, pPnumber, pPHousekey, pPbiskey, Float:pPos_x, Float:pPos_y, Float:pPos_z, pCarLic, pFlyLic, pBoatLic, pFishLic, pGunLic, pPayDay, pCDPlayer, pWins, pLoses, pAlcoholPerk, pDrugPerk, pMiserPerk, pPainPerk, pTraderPerk, pTut, pWarns, pMarried, pParedao, pRequestingBackup, pMask, pMaskuse, pBarraca, pMarriedTo[64], pSpawn, pSafeDrogas, pSafeDrogas2, pSafeDrogas3, pVeiculo, pVeiculo2, pVeiculo3, pPcarkey, pPcarkey2, pPcarkey3, pPcarkey4, psMats, pLuta, pAutorizado, pAutorizado2, pDorgado, pDorgado2, pDoenca, pLastDia, pLastMes, pLastAno, pLastHora, pLastMinuto, pCreditos, pLastLogin[20], pGun1, pGun2, pGun3, pGun4, pGun5, pGun6, pGun7, pGun8, pGun9, pGun10, pGun11, pGun12, pAmmo1, pAmmo2, pAmmo3, pAmmo4, pAmmo5, pAmmo6, pAmmo7, pAmmo8, pAmmo9, pAmmo10, pAmmo11, pAmmo12, pCheckInfoOrg, pCaixinha, pBan, pDiaBanTemp, pMesBanTemp, pAnoBanTemp, pPlantei, pBombL, pAutorizadoDetran, pAutorizadoSwat, pVendoGlobo, pVendoRecord }; new PlayerInfo[256][pInfo];
CMD:agendarvip(playerid, params[]) { new OutroPlayer[24], Level, Dias, Str[50]; if(sscanf(params, "s[24]ii", OutroPlayer, Level, Dias)) return SendClientMessage(playerid, -1, "/darvip [nome] [level] [dias]"); format(Str, sizeof Str, "%s.ini", OutroPlayer); if(fexist(Str)) { DOF2_SetInt(Str, "VIP Level", Level); DOF2_SetInt(Str, "VIP Tempo", Dias * 24 * 60 * 60 + gettime()); } else return SendClientMessage(playerid, -1, "Este usuбrio nгo existe!"); return 1; }
obrigado pela ajuda , tenho muito a aprender ainda kk, como to editando uma gm baixada , й difнcil achar algumas coisas.
|