[Pedido] Sistema de VIP
#6

Esse sistema vip e do GM DTEN funciona perfeitamente vc pode setar dias vip com ele vc vai precisar da include
deten_vip

e esse cod para setar o vip
Код:
#include <a_samp>
#include <sscanf2>
#include "../include/dten_vip.inc"

#define DIALOG_DARVIP                99999
#define DIALOG_TIRARVIP              88888
public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

public OnPlayerConnect(playerid)
{
    CheckPlayerVIP(playerid);
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
 	if (strcmp("/Setarvip", cmdtext, true, 10) == 0)
	{
        if(IsPlayerAdmin(playerid))
        {
           ShowPlayerDialog(playerid, DIALOG_DARVIP, DIALOG_STYLE_INPUT,"SetarVip","Digite o [ID] ou o [NICK] do jogador. \nE os [DIAS] que serб vip.","Setar","Cancelar");
        }
        else
        {
           SendClientMessage(playerid,0xFFFF00AA,"[x]({FF0000}/setarvip{FFFF00})[x] {FF0000}Comando errado.");
        }
        return 1;
	}
   	if (strcmp("/Tirarvip", cmdtext, true, 10) == 0)
	{
        if(IsPlayerAdmin(playerid))
        {
           ShowPlayerDialog(playerid, DIALOG_TIRARVIP, DIALOG_STYLE_INPUT,"TirarVip","Digite o [ID] ou o [NICK] do jogador","Tirar","Cancelar");
        }
        else
        {
          SendClientMessage(playerid, 0xFFFF00AA, "{FFFF00}[x]({FF0000}/tirarvip{FFFF00})[x] {FF0000}Comando errado.");
        }
        return 1;
	}
    if (strcmp("/eusouvip", cmdtext, true, 10) == 0)
    {
        if(IsPlayerVIP(playerid)) return SendClientMessage(playerid,0xFFFF00AA,"Vocк nгo e vip.");
        {
             SendPlayerMessageToAll(0xFFFF00AA,"Eu sou vip entгo me chupa........");
        }
        return 1;
    }
	return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == DIALOG_TIRARVIP)
	{
		if(response)
		{
			new plid, string[256];
			if(sscanf(inputtext, "u", plid))
			{
				ShowPlayerDialog(playerid, DIALOG_TIRARVIP, DIALOG_STYLE_INPUT,"TirarVip","Vocк digito algo errado.\nDigite o id ou o nick do jogador.","Tirar","Cancelar");
				return 1;
			}
			if(IsPlayerConnected(plid))
			{
				UnsetPlayerVIP(plid);
				format(string, sizeof(string), "%s (%d) (») Retirou o VIP do(a): %s (%d)", getName(playerid), playerid, getName(plid), plid);
				SendClientMessageToAll(0xFF0000AA, string);
			}
			else
			{
				SendClientMessage(playerid, 0xFF0000AA, "Valor invбlido, tente novamente!");
			}
		}
		return 1;
	}
	if(dialogid == DIALOG_DARVIP)
	{
		if(response)
		{
			new plid, dias, string[256];
			if(sscanf(inputtext, "ui", plid, dias))
			{
				ShowPlayerDialog(playerid, DIALOG_DARVIP, DIALOG_STYLE_INPUT,"SetarVip","Vocк digito algo errado.\nDigite o [ID] ou o [NICK] do jogador. \nE os [DIAS].","Setar","Cancelar");
				return 1;
			}
			if(IsPlayerConnected(plid))
			{
				if(dias > 30 || dias < 1)
				{
					ShowPlayerDialog(playerid, DIALOG_DARVIP, DIALOG_STYLE_INPUT,"SetarVip","Nгo pode setar mais \nde 30 dias ou menos de 1 dia!","Setar","Cancelar");
				}
				else
				{
					if(GetVIPDays(plid) > 5)
					{
						SendClientMessage(playerid, 0xFF0000AA, "Este jogador ainda tem mais de 5 dias VIP.");
					}
					else
					{
						SetPlayerVIP(plid, dias);
						format(string, sizeof(string), "%s (%d) (») Promoveu: %s (%d) para VIP (») Por %d dia(s)!", getName(playerid), playerid, getName(plid), plid, dias);
						SendClientMessageToAll(0xCC00CCAA, string);
					}
				}
			}
			else
			{
                ShowPlayerDialog(playerid, DIALOG_DARVIP, DIALOG_STYLE_INPUT,"SetarVip","Valor invбlido, tente novamente!","Setar","Cancelar");
            }
		}
	}
	return 1;
}
nгo se esqueзa de criar uma pasta vips na pasta scriptfiles
caso manden eu tirar esse codigo e a include vгo ser tirada sem aviso porque nгo e meu essa invenзгo OK>>
Reply


Messages In This Thread
Sistema de VIP - by victorlus - 26.07.2014, 07:50
Re: Sistema de VIP - by rebelox - 26.07.2014, 10:54
Re: Sistema de VIP - by darkxdll - 26.07.2014, 12:37
Re: Sistema de VIP - by rebelox - 26.07.2014, 12:44
Re: Sistema de VIP - by darkxdll - 26.07.2014, 13:09
Re: Sistema de VIP - by Marlon307 - 26.07.2014, 13:27

Forum Jump:


Users browsing this thread: 1 Guest(s)