[Ajuda] Sistema de VIP
#10

Comando /darvip ficou assim, estб certo?

pawn Код:
CMD:darvip(playerid, params[])
{
    new id, vip, string[256], ganhouvip[MAX_PLAYER_NAME];
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xAD0000AA, "{FF0000}[x] Vocк nгo estб autorizado a usar este comando!");
    if(sscanf(params, "ud", id, vip)) return SendClientMessage(playerid, 0xAD0000AA, "[ > ] Uso correto: /darvip [id] 1 (1 para ativar, 0 para desativar)");
    if (vip < 1 || vip > 2) return SendClientMessage(playerid, 0xFF0000FF, "[x] Level invбlido! Use de 0 a 1");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xAD0000AA, "[x] Este jogador nгo estб online.");
    GetPlayerName(id, ganhouvip, sizeof(ganhouvip));
    format(string, sizeof(string), "[ > ] Vocк deu vip level %s para o %s", LevelVip(vip), ganhouvip);
    SendClientMessage(playerid, 0x00F6F6AA, string);
    pVip[id][Vip] =  vip;
    DOF2_CreateFile(PegarVip(playerid));
    DOF2_GetInt(PegarVip(playerid), "VIP", pVip[playerid][Vip]);
    SalvarVip(playerid);
    return 1;
}
E o tirar vip tem que colocar tambйm ne? porem tirar o createfile?


pawn Код:
CMD:tirarvip(playerid, params[])
{
    new id, string[256], string1[256], admintirou[MAX_PLAYER_NAME], ganhouvip[MAX_PLAYER_NAME];
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, RED, "[x] Vocк nгo estб autorizado a usar este comando!");
    if(sscanf(params, "u", id)) return SendClientMessage(playerid, YELLOW, "[ > ] Uso correto: /tirarvip [ID]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xAD0000AA, "[X] Este jogador nгo estб online!");
    GetPlayerName(id, ganhouvip, sizeof(ganhouvip));
    GetPlayerName(id, admintirou, sizeof(admintirou));
    format(string, sizeof(string), "[ > ] Vocк tirou o vip do jogador %s", ganhouvip);
    SendClientMessage(playerid, 0x00F6F6AA, string);
    format(string1, sizeof(string1), "[ > ] %s tirou o seu vip (parece que os dias acabaram, compre mais um mкs indo ao fуrum)", admintirou);
    SendClientMessage(playerid, 0x00F6F6AA, string1);
    pVip[id][Vip] =  0;
    DOF2_GetInt(PegarVip(playerid), "Vip", pVip[playerid][Vip]);
    SalvarVip(playerid);
    return 1;
}
Reply


Messages In This Thread
Sistema de VIP - by viniciussvl - 13.01.2016, 02:24
Re: Sistema de VIP - by Vegassilva - 13.01.2016, 10:57
Re: Sistema de VIP - by Vegassilva - 13.01.2016, 11:00
Re: Sistema de VIP - by viniciussvl - 13.01.2016, 13:00
Re: Sistema de VIP - by Coringa_Vilao - 13.01.2016, 13:11
Re: Sistema de VIP - by viniciussvl - 13.01.2016, 13:13
Re: Sistema de VIP - by Coringa_Vilao - 13.01.2016, 13:16
Re: Sistema de VIP - by Coringa_Vilao - 13.01.2016, 13:20
Re: Sistema de VIP - by viniciussvl - 13.01.2016, 13:20
Re: Sistema de VIP - by viniciussvl - 13.01.2016, 13:23

Forum Jump:


Users browsing this thread: 3 Guest(s)