[FilterScript] AdiVIP - Sistema de VIP
#1

AdiVIP - Sistema de VIP v1.3

Sobre
Este й um sistema bбsico de VIP. Usei o mesmo cуdigo do antigo Sistema de VIP que eu criei.
Para quem quer fazer um Sistema de VIP isto pode ser uma boa base para comeзar. Irei estar sempre atualizando com vбrias vantagens para VIP atй nгo ter mais ideias para vantagens kkkk
Comandos
Comando /VantagensVIP
Comando /Vencimento
Changelog

Quote:
Update 23/03/2018 - v1.1
  • Resolvido Alguns Bugs
  • Adicionado Sistema de Neon
Update 24/03/2018 - v1.2
  • Melhoramento do cуdigo - Agradecimento ao F1N4L
  • Resolvido alguns bugs - Sem bugs no momento
Update 26/03/2018 - v1.3
  • Adicionado Nitro Infinito para vips
  • Adicionado Reparo Automбtico ao soltar nitro
  • Adicionado o comando /VantagensVIP
Crйditos
• Double-O-Seven - DOF2
• ****** e Emmet_ - SSCANF
• ZeeX - ZCMD
Download

https://github.com/AdiitiProgrammer/AdiVIP
Reply
#2

Legal, da para ajudar quem procura por sistemas de vip do tipo.
Reply
#3

Gostei da organizaзгo,parabйns.
Reply
#4

Hm boa meu portugues kk
Reply
#5

Код:
CMD:vips(playerid)
{
	new ContarVIPs = 0;
	new StringCat[1000];

	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			if(IsPlayerVIP(playerid))
			{
				format(Str, sizeof(Str), "{00FFFF}%s {FFFFFF}[{00FFFF}%i{FFFFFF}]\n", PlayerName(i), i);
				strcat(StringCat, Str);
				ContarVIPs++;
			}
		}
	}

	if(ContarVIPs == 0)
		ShowPlayerDialog(playerid, 5000, DIALOG_STYLE_MSGBOX, "{FFFFFF}VIPs Online [{FF0000} 0{FFFFFF}]", "{FF0000}Nenhum VIP online!", "Fechar", #);
	else if(ContarVIPs == 1)
		ShowPlayerDialog(playerid, 5000, DIALOG_STYLE_MSGBOX, "{FFFFFF}VIP Online [{00BFFF} 1 {FFFFFF}]", StringCat, "Fechar", #);
	else
	{
		format(Str, sizeof(Str), "{FFFFFF}VIPs Online [{00BFFF} %d {FFFFFF}]", ContarVIPs);
		ShowPlayerDialog(playerid, 5000, DIALOG_STYLE_MSGBOX, Str, StringCat, "Fechar", #);
	}
	return 1;
}
Reply
#6

Obrigado a todos pelos comentбrios.

@n0minal Obrigado por reportar o bug

@TOPIC

Quote:
Update 23/03/2018 - v1.1
  • Resolvido Alguns Bugs
  • Adicionado Sistema de Neon
Reply
#7

Pena que o usuбrio VIP tem poucas vantagens no seu sistema, fora isso eu gostei do seu trabalho.
Reply
#8

Parabйns pelo sistema.

__________________

Apenas alguns detalhes que nгo pude deixar despercebidos:

#1 - Vocк pode utilizar somente um SendClientMessageToAll(GetPlayerColor(playerid), Str); no switch da linha 85, apenas adicione a funзгo no final do switch e nгo em todos os "case".

#2 - No switch da linha 158 vocк usa DeletePVar(playerid, "Status"); apуs um objeto ser destruнdo. Por quк?

#3 - O propуsito de PVars й compartilhar informaзхes entre scripts (como CallRemoteFunction). Recomendo o uso de variбveis.

#4 - Toda vez que for usar uma funзгo nativa MAIS DE UMA VEZ no mesmo script, recomendo armazenar o valor retornado da funзгo em uma variбvel.
Como o caso abaixo:
Код:
AttachObjectToVehicle(GetPVarInt(playerid, "neon24"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon25"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon26"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon27"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
#5 - Na funзгo RemoverV vocк usa no final DOF2_SaveFile();, sendo que a funзгo DOF2_RemoveFile retorna a remoзгo do arquivo, o que nгo faz sentido o uso de DOF2_SaveFile.

Foram alguns pontos que eu vi e que podem ser melhorados.
Reply
#9

Quote:
Originally Posted by ThiagoScottish
Посмотреть сообщение
Pena que o usuбrio VIP tem poucas vantagens no seu sistema, fora isso eu gostei do seu trabalho.
Obrigado mano. O sistema ainda nгo estб finalizado irei adicionar mais coisas ao longo do tempo como falei no tуpico

Quote:
Originally Posted by F1N4L
Посмотреть сообщение
Parabйns pelo sistema.

__________________

Apenas alguns detalhes que nгo pude deixar despercebidos:

#1 - Vocк pode utilizar somente um SendClientMessageToAll(GetPlayerColor(playerid), Str); no switch da linha 85, apenas adicione a funзгo no final do switch e nгo em todos os "case".

#2 - No switch da linha 158 vocк usa DeletePVar(playerid, "Status"); apуs um objeto ser destruнdo. Por quк?

#3 - O propуsito de PVars й compartilhar informaзхes entre scripts (como CallRemoteFunction). Recomendo o uso de variбveis.

#4 - Toda vez que for usar uma funзгo nativa MAIS DE UMA VEZ no mesmo script, recomendo armazenar o valor retornado da funзгo em uma variбvel.
Como o caso abaixo:
Код:
AttachObjectToVehicle(GetPVarInt(playerid, "neon24"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon25"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon26"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon27"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
#5 - Na funзгo RemoverV vocк usa no final DOF2_SaveFile();, sendo que a funзгo DOF2_RemoveFile retorna a remoзгo do arquivo, o que nгo faz sentido o uso de DOF2_SaveFile.

Foram alguns pontos que eu vi e que podem ser melhorados.
Obrigado pelas dicas. Fiz um melhoramento no cуdigo.

@TOPIC

Quote:
Update 24/03/2018 - v1.2
  • Melhoramento do cуdigo - Agradecimento ao F1N4L
  • Resolvido alguns bugs - Sem bugs no momento
Reply
#10

De 711 Linhas Para 495 Linhas .-.
PHP код:
#include <a_samp>
#include <sscanf2>
#include <ZCMD>
#include <DOF2>

//===== [ COLORS ] =====//
#define VERMELHO                        0xFF0000FF
#define AZUL_BEST                        0x1E90FFFF
#define VERDE                            0x00FF00FF
#define COLOR_MAGENTA                    0xFF00FFFF

//===== [ MACROS ] =====//
#define SendClientFormat(%0,%1,%2,%3); \
    
format(Strsizeof(Str), %2, %3); SendClientMessage(%0, %1Str);

#define SendClientFormatToAll(%0,%1,%2); \
    
format(Strsizeof(Str), %1, %2); SendClientMessageToAll(%0Str);

#define @_CallBack:%0(%1) \
    
forward%0(%1); public%0(%1)

//===== [ DIALOGS ] =====//
#define DIALOG_COR_VIP                5001
#define DIALOG_VIP_NEON                5002

//===== [ NEWS ] =====//
new Str[128];
//====================


public OnFilterScriptInit() {
    print(
"\n----------------------------------------------");
    print(
" AdiVIP Carregado com Sucesso! By:Adiiti");
    print(
"------------------------------------------------\n");
    
SetTimer("AtualizarChatBubble"1000true);
    return 
1;
}

public 
OnFilterScriptExit() {
    
DOF2_Exit();
    return 
1;
}

public 
OnPlayerSpawn(playerid) {
    if(
GetPVarInt(playerid"Spawnou") != 1) {
        if(
IsPlayerVIP(playerid )) {
            
format(Strsizeof(Str), "/VIPs/%s.ini"PlayerName(playerid));
            if(
gettime() > DOF2_GetInt(Str"Vencimento")) {
                
RemoverV(playerid);
                
SendClientMessage(playeridVERMELHO"Seu VIP expirou e jб nгo tem mais acesso aos comandos exclusivo VIP!");
                
SetPVarInt(playerid"Spawnou"1);
                return 
1;
            } else {
                
SendClientMessage(playeridAZUL_BEST"Vocк й um jogador VIP! Para ver o vencimento digite /Vencimento!");
                
SetPVarInt(playerid"Spawnou"1);
                return 
1;
            }
        }
    }
    return 
1;
}

public 
OnPlayerText(playeridtext[]) {
    if(
IsPlayerVIP(playerid)) {
        
format(Strsizeof(Str), "/VIPs/%s.ini"PlayerName(playerid));
        new 
cor DOF2_GetInt(Str"CorVIP");
        
format(Strsizeof(Str), "%s: {FFFFFF}[%d] [{%s}VIP{FFFFFF}] %s"PlayerName(playerid), playeridcor == ? ("FF00FF") : cor == ? ("FFFF00") : cor == ? ("FFA500") : cor == ? ("00FF00") : cor == ? ("00FFFF") : cor == ? ("0000FF") : cor == ? ("B5B5B5") : cor == ? ("FF0000") : ("FFFFFF"), text);
        
SendClientMessageToAll(GetPlayerColor(playerid), Str);
        return 
0;
    }
    return 
1;
}

public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[]) {
    switch(
listitem) {
        case 
DIALOG_COR_VIP: {
            if(
response) {
                
format(Strsizeof(Str), "VIPs/%s.ini"PlayerName(playerid));
                
DOF2_SetInt(Str"CorVIP", (listitem 1) );
                
DOF2_SaveFile();
                
SendClientMessage(playeridVERDE"Cor alterada com sucesso!");
            }
        } case 
DIALOG_VIP_NEON: {
            if(
response) {
                
DestroyObject(GetPVarInt(playerid"neon"));
                
DestroyObject(GetPVarInt(playerid"neon1"));
                
DestroyObject(GetPVarInt(playerid"neon2"));
                
DestroyObject(GetPVarInt(playerid"neon3"));
                
DestroyObject(GetPVarInt(playerid"neon4"));
                
DestroyObject(GetPVarInt(playerid"neon5"));
                
DestroyObject(GetPVarInt(playerid"neon6"));
                
DestroyObject(GetPVarInt(playerid"neon7"));
                
DestroyObject(GetPVarInt(playerid"neon8"));
                
DestroyObject(GetPVarInt(playerid"neon9"));
                
DestroyObject(GetPVarInt(playerid"neon10"));
                
DestroyObject(GetPVarInt(playerid"neon11"));
                
DestroyObject(GetPVarInt(playerid"neon12"));
                
DestroyObject(GetPVarInt(playerid"neon13"));
                
DestroyObject(GetPVarInt(playerid"neon14"));
                
DestroyObject(GetPVarInt(playerid"neon15"));
                
DestroyObject(GetPVarInt(playerid"neon16"));
                
DestroyObject(GetPVarInt(playerid"neon17"));
                
DestroyObject(GetPVarInt(playerid"neon18"));
                
DestroyObject(GetPVarInt(playerid"neon19"));
                
DestroyObject(GetPVarInt(playerid"neon20"));
                
DestroyObject(GetPVarInt(playerid"neon21"));
                
DestroyObject(GetPVarInt(playerid"neon22"));
                
DestroyObject(GetPVarInt(playerid"neon23"));
                
DestroyObject(GetPVarInt(playerid"neon24"));
                
DestroyObject(GetPVarInt(playerid"neon25"));
                
DestroyObject(GetPVarInt(playerid"neon26"));
                
DestroyObject(GetPVarInt(playerid"neon27"));
                
DestroyObject(GetPVarInt(playerid"neon28"));
                
DestroyObject(GetPVarInt(playerid"neon29"));
                
DestroyObject(GetPVarInt(playerid"neon30"));
                
DestroyObject(GetPVarInt(playerid"neon31"));
                
DestroyObject(GetPVarInt(playerid"neon32"));
                
DestroyObject(GetPVarInt(playerid"neon33"));
                
DestroyObject(GetPVarInt(playerid"neon34"));
                
DestroyObject(GetPVarInt(playerid"neon35"));
                switch(
listitem) {
                    case 
0: {
                        
SetPVarInt(playerid"neon"CreateObject(18648,0,0,0,0,0,0));
                        
SetPVarInt(playerid"neon1"CreateObject(18648,0,0,0,0,0,0));
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0);
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon1"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0);
                        
SendClientMessage(playeridVERDE"Neon adicionado com sucesso!");
                    } case 
1: {
                        
SetPVarInt(playerid"neon2"CreateObject(18647,0,0,0,0,0,0));
                        
SetPVarInt(playerid"neon3"CreateObject(18647,0,0,0,0,0,0));
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon2"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0);
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon3"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0);
                        
SendClientMessage(playeridVERDE"Neon adicionado com sucesso!");
                    } case 
2: {
                        
SetPVarInt(playerid"neon4"CreateObject(18649,0,0,0,0,0,0));
                        
SetPVarInt(playerid"neon5"CreateObject(18649,0,0,0,0,0,0));
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon4"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0);
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon5"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0);
                        
SendClientMessage(playeridVERDE"Neon adicionado com sucesso!");
                    } case 
3: {
                        
SetPVarInt(playerid"Status"1);
                        
SetPVarInt(playerid"neon6"CreateObject(18652,0,0,0,0,0,0));
                        
SetPVarInt(playerid"neon7"CreateObject(18652,0,0,0,0,0,0));
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon6"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0);
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon7"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0);
                        
SendClientMessage(playeridVERDE"Neon adicionado com sucesso!");
                    } case 
4: {
                        
SetPVarInt(playerid"neon8"CreateObject(18651,0,0,0,0,0,0));
                        
SetPVarInt(playerid"neon9"CreateObject(18651,0,0,0,0,0,0));
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon8"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0);
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon9"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0);
                        
SendClientMessage(playeridVERDE"Neon adicionado com sucesso!");
                    } case 
5: {
                        
SetPVarInt(playerid"neon10"CreateObject(18650,0,0,0,0,0,0));
                        
SetPVarInt(playerid"neon11"CreateObject(18650,0,0,0,0,0,0));
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon10"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0);
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon11"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0);
                        
SendClientMessage(playeridVERDE"Neon adicionado com sucesso!");
                    } case 
6: {
                        
SetPVarInt(playerid"neon12"CreateObject(18648,0,0,0,0,0,0));
                        
SetPVarInt(playerid"neon13"CreateObject(18648,0,0,0,0,0,0));
                        
SetPVarInt(playerid"neon14"CreateObject(18649,0,0,0,0,0,0));
                        
SetPVarInt(playerid"neon15"CreateObject(18649,0,0,0,0,0,0));
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon12"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0);
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon13"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0);
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon14"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0);
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon15"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0);
                        
SendClientMessage(playeridVERDE"Neon adicionado com sucesso!");
                    } case 
7: {
                        
SetPVarInt(playerid"neon16"CreateObject(18648,0,0,0,0,0,0));
                        
SetPVarInt(playerid"neon17"CreateObject(18648,0,0,0,0,0,0));
                        
SetPVarInt(playerid"neon18"CreateObject(18652,0,0,0,0,0,0));
                        
SetPVarInt(playerid"neon19"CreateObject(18652,0,0,0,0,0,0));
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon16"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0);
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon17"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0);
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon18"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0);
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon19"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0);
                        
SendClientMessage(playeridVERDE"Neon adicionado com sucesso!");
                    } case 
8: {
                        
SetPVarInt(playerid"neon20"CreateObject(18647,0,0,0,0,0,0));
                        
SetPVarInt(playerid"neon21"CreateObject(18647,0,0,0,0,0,0));
                        
SetPVarInt(playerid"neon22"CreateObject(18652,0,0,0,0,0,0));
                        
SetPVarInt(playerid"neon23"CreateObject(18652,0,0,0,0,0,0));
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon20"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0);
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon21"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0);
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon22"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0);
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon23"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0);
                        
SendClientMessage(playeridVERDE"Neon adicionado com sucesso!");
                    } case 
9: {
                        
SetPVarInt(playerid"neon24"CreateObject(18647,0,0,0,0,0,0));
                        
SetPVarInt(playerid"neon25"CreateObject(18647,0,0,0,0,0,0));
                        
SetPVarInt(playerid"neon26"CreateObject(18650,0,0,0,0,0,0));
                        
SetPVarInt(playerid"neon27"CreateObject(18650,0,0,0,0,0,0));
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon24"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0);
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon25"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0);
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon26"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0);
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon27"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0);
                        
SendClientMessage(playeridVERDE"Neon adicionado com sucesso!");
                    } case 
10: {
                        
SetPVarInt(playerid"neon28"CreateObject(18649,0,0,0,0,0,0));
                        
SetPVarInt(playerid"neon29"CreateObject(18649,0,0,0,0,0,0));
                        
SetPVarInt(playerid"neon30"CreateObject(18652,0,0,0,0,0,0));
                        
SetPVarInt(playerid"neon31"CreateObject(18652,0,0,0,0,0,0));
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon28"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0);
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon29"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0);
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon30"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0);
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon31"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0);
                        
SendClientMessage(playeridVERDE"Neon adicionado com sucesso!");
                    } case 
11: {
                        
SetPVarInt(playerid"neon32"CreateObject(18652,0,0,0,0,0,0));
                        
SetPVarInt(playerid"neon33"CreateObject(18652,0,0,0,0,0,0));
                        
SetPVarInt(playerid"neon34"CreateObject(18650,0,0,0,0,0,0));
                        
SetPVarInt(playerid"neon35"CreateObject(18650,0,0,0,0,0,0));
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon32"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0);
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon33"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0);
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon34"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0);
                        
AttachObjectToVehicle(GetPVarInt(playerid"neon35"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0);
                        
SendClientMessage(playeridVERDE"Neon adicionado com sucesso!");
                    } case 
12SendClientMessage(playeridVERDE"Neon retirado com sucesso!");
                }
            }
        }
    }
    return 
1;
}

CMD:setarvip(playeridparams[]) {
    if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playeridVERMELHO"Vocк nгo tem permissгo!");
    new 
IDdias;
    if(
sscanf(params"ud"IDdias)) return SendClientMessage(playeridVERMELHO"Digite: /SetarVIP (id-do-jogador) (Dias)");
    if(!
IsPlayerConnected(ID)) return SendClientMessage(playeridVERMELHO"Jogador nгo conectado!");
    
SetarV(IDdias);
    
SendClientFormat(playeridAZUL_BEST"Vocк deu %d dias de VIP para o(a) jogador(a) %s[%d]"diasPlayerName(ID), ID);
    
SendClientFormat(IDAZUL_BEST"O(A) Staff %s setou %d dias de VIP para vocк!"PlayerName(playerid), dias);
    return 
1;
}

CMD:agendarvip(playeridparams[]) {
    if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playeridVERMELHO"Vocк nгo tem permissгo!");
    new 
nick[24], dias;
    if(
sscanf(params"s[24]d"nickdias)) return SendClientMessage(playeridVERMELHO"Digite: /agendarvip (nick) (dias)");
    
format(Strsizeof(Str), "/VIPs/%s.ini"nick);
    if(!
DOF2_FileExists(Str)) DOF2_CreateFile(Str);
    
DOF2_SetInt(Str"Vencimento", (gettime() + (dias 86400) ) );
    
DOF2_SaveFile();
    
format(Strsizeof(Str), "Vocк deu %d dias de VIP para %s!"diasnick);
    
SendClientMessage(playerid, -1Str);
    return 
1;
}

CMD:removervip(playeridparams[]) {
    if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playeridVERMELHO"Vocк nгo tem permissгo!");
    new 
ID;
    if(
sscanf(params"u"ID)) return SendClientMessage(playeridVERMELHO"Digite: /RemoverVip (id-do-jogador)");
    if(!
IsPlayerConnected(ID)) return SendClientMessage(playeridVERMELHO"Jogador nгo conectado!");
    if(!
IsPlayerVIP(ID)) return SendClientMessage(playeridVERMELHO"Esse jogador nгo й VIP!");
    
RemoverV(ID);
    
SendClientFormat(playeridAZUL_BEST"Vocк removeu o VIP do(a) jogador(a) %s[%d]!"PlayerName(ID), ID);
    
SendClientFormat(IDAZUL_BEST"O(A) Staff %s removeu o seu VIP!"PlayerName(playerid));
    return 
1;
}

CMD:vencimento(playerid) {
    if(!
IsPlayerVIP(playerid)) return SendClientMessage(playeridVERMELHO"Vocк nгo tem permissгo!");
    new 
StringCat[256], StrFile[128];
    
format(StrFilesizeof(StrFile), "/VIPs/%s.ini"PlayerName(playerid));
    
format(Strsizeof(Str), "{FFD700}Nick: {FFFFFF}%s\n\n"PlayerName(playerid));
    
strcat(StringCatStr);
    
format(Strsizeof(Str), "{FFD700}Vencimento: {FFFFFF}%s \n\n"convertTimestamp(DOF2_GetInt(StrFile"Vencimento"), 1));
    
strcat(StringCatStr);
    
strcat(StringCat"Aproveite o seu VIP atй o ъltimo minuto!\n{FFD700}Creditos: {FFFFFF}Adiiti Programmer\n");
    
ShowPlayerDialog(playerid5000DIALOG_STYLE_MSGBOX"{FF0000}Vencimento"StringCat"Fechar""");
    return 
1;
}

CMD:vips(playerid) {
    new 
ContarVIPs 0;
    new 
StringCat[1000];
    for(new 
0MAX_PLAYERSi++) {
        if(
IsPlayerConnected(i)) {
            if(
IsPlayerVIP(i)) {
                
format(Strsizeof(Str), "{FFD700}%s {FFFFFF}[%i]\n"PlayerName(i), i);
                
strcat(StringCatStr);
                
ContarVIPs++;
            }
        }
    }

    if(
ContarVIPs == 0) { ShowPlayerDialog(playerid5000DIALOG_STYLE_MSGBOX"{FFFFFF}VIPs Online [{FF0000} 0{FFFFFF}]""{FF0000}Nenhum VIP online!""Fechar"#);
    
} else if(ContarVIPs == 1) { ShowPlayerDialog(playerid5000DIALOG_STYLE_MSGBOX"{FFFFFF}VIP Online [{00BFFF} 1 {FFFFFF}]"StringCat"Fechar"#);
    
} else {
        
format(Strsizeof(Str), "{FFFFFF}VIPs Online [{00BFFF} %d {FFFFFF}]"ContarVIPs);
        
ShowPlayerDialog(playerid5000DIALOG_STYLE_MSGBOXStrStringCat"Fechar"#);
    
}
    return 
1;
}

CMD:coletev(playerid) {
    if(
IsPlayerVIP(playerid)) return SendClientMessage(playeridVERMELHO"Vocк nгo tem permissгo!");
    
SendClientMessage(playeridVERDE"Colete criado com sucesso!");
    
SetPlayerArmour(playerid100.0);
    return 
1;
}

CMD:jetpackv(playerid) {
    if(!
IsPlayerVIP(playerid)) return SendClientMessage(playeridVERMELHO"Vocк nгo tem permissгo!");
    if(
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playeridVERMELHO"Vocк nгo pode utilizar esse comando em um veнculo!");
    
SendClientMessage(playeridVERDE"Jetpack criado com sucesso!");
    
SetPlayerSpecialAction(playerid2);
    return 
1;
}

CMD:v(playeridparams[]) {
    new 
texto[128], StringText[128];
    if(!
IsPlayerVIP(playerid)) return SendClientMessage(playeridVERMELHO"Vocк nгo tem permissгo!");
    if(
sscanf(params"s[128]"texto)) return SendClientMessage(playeridVERMELHO"Use: /V (Texto)");
    if(
strval(texto) > 100) return SendClientMessage(playeridVERMELHO"Texto muito grande, diminua por favor!");
    
format(StringTextsizeof(StringText), "## Chat-VIP ## %s[%i]: %s"PlayerName(playerid), playeridtexto);
    
ChatVIP(COLOR_MAGENTAStringTextplayerid);
    return 
1;
}

CMD:virarv(playeridparams[]) {
    if(!
IsPlayerVIP(playerid)) return SendClientMessage(playeridVERMELHO"Vocк nгo tem permissгo!");
    if(
GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playeridVERMELHO"Vocк nгo estб dirigindo um veнculo!");
    new 
Float:avehicleid GetPlayerVehicleID(playerid);
    
GetVehicleZAngle(vehicleida);
    
SetVehicleZAngle(vehicleida);
    
SendClientMessage(playeridVERDE"Vocк virou o veнculo!");
    return 
1;
}

CMD:repararv(playerid) {
    if(!
IsPlayerVIP(playerid)) return SendClientMessage(playeridVERMELHO"Vocк nгo tem permissгo!");
    if(
GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playeridVERMELHO"Vocк nгo estб dirigindo um veнculo!");
    
RepairVehicle(GetPlayerVehicleID(playerid));
    
SendClientMessage(playeridVERDE"Vocк reparou o veнculo com sucesso!");
    return 
1;
}

CMD:pintarv(playeridparams[]) {
    if(!
IsPlayerVIP(playerid)) return SendClientMessage(playeridVERMELHO"Vocк nгo tem permissгo!");
    if(
GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playeridVERMELHO"Vocк nгo estб dirigindo um veнculo!");
    new 
COR1COR2;
    if(
sscanf(params"dd"COR1COR2)) return SendClientMessage(playeridVERMELHO"Digite: /pintar (cor-1) (cor-2)");
    
ChangeVehicleColor(GetPlayerVehicleID(playerid), COR1COR2);
    
SendClientMessage(playeridVERDE"Vocк pintou o seu veнculo com sucesso!");
    return 
1;
}

CMD:comandosvip(playerid) {
    if(!
IsPlayerVIP(playerid)) return SendClientMessage(playeridVERMELHO"Vocк nгo tem permissгo!");
    new 
StringCat[500];
    
strcat(StringCat"Comando\tFunзгo\n");
    
strcat(StringCat"{FFD700}/Vencimento \t{FFFFFF}Use para ver o vencimento do seu VIP\n");
    
strcat(StringCat"{FFD700}/ColeteV \t{FFFFFF}Use para colocar colete\n");
    
strcat(StringCat"{FFD700}/JetpackV \t{FFFFFF}Use para criar um jetpack\n");
    
strcat(StringCat"{FFD700}/VirarV \t{FFFFFF}Use para virar o veнculo\n");
    
strcat(StringCat"{FFD700}/RepararV \t{FFFFFF}Use para reparar o veнculo\n");
    
strcat(StringCat"{FFD700}/PintarV \t{FFFFFF}Use para pintar o veнculo\n");
    
strcat(StringCat"{FFD700}/NeonV \t{FFFFFF}Use para colocar neon no veнculo\n");
    
strcat(StringCat"{FFD700}/V \t{FFFFFF}Use para falar no chat vip");
    
ShowPlayerDialog(playerid5000DIALOG_STYLE_TABLIST_HEADERS"{FFD700}Comandos VIP"StringCat"Fechar""");
    return 
1;
}

CMD:corvip(playeridparams[]) {
    new 
StringCat[500];
    if(!
IsPlayerVIP(playerid)) return SendClientMessage(playeridVERMELHO"Vocк nгo tem permissгo!");
    
strcat(StringCat"{FF00FF}VIP\n");
    
strcat(StringCat"{FFFF00}VIP\n");
    
strcat(StringCat"{FFA500}VIP\n");
    
strcat(StringCat"{00FF00}VIP\n");
    
strcat(StringCat"{00FFFF}VIP\n");
    
strcat(StringCat"{0000FF}VIP\n");
    
strcat(StringCat"{B5B5B5}VIP\n");
    
strcat(StringCat"{FF0000}VIP");
    
ShowPlayerDialog(playeridDIALOG_COR_VIPDIALOG_STYLE_LIST"{00FF00}Cor VIP"StringCat"Continuar""Fechar");
    return 
1;
}

CMD:neonv(playerid) {
    if(!
IsPlayerVIP(playerid)) return SendClientMessage(playeridVERMELHO"Vocк nгo tem permissгo!");
    if(
GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playeridVERMELHO"Vocк nгo estб dirigindo um veнculo!");
    new 
StringCat[256];
    
strcat(StringCat"Azul Escuro\n");
    
strcat(StringCat"Vermelho\n");
    
strcat(StringCat"Verde\n");
    
strcat(StringCat"Branco\n");
    
strcat(StringCat"Violeta\n");
    
strcat(StringCat"Amarelo\n");
    
strcat(StringCat"Ciano\n");
    
strcat(StringCat"Azul Claro\n");
    
strcat(StringCat"Rosa\n");
    
strcat(StringCat"Laranja\n");
    
strcat(StringCat"Verde Claro\n");
    
strcat(StringCat"Amarelo Claro\n");
    
strcat(StringCat"Remover Neon");
    
ShowPlayerDialog(playeridDIALOG_VIP_NEONDIALOG_STYLE_LIST"Neon"StringCat"Selecionar""Cancelar");
    return 
1;
}

@
_CallBackAtualizarChatBubble() {
    for(new 
0MAX_PLAYERSi++) {
        if(
IsPlayerVIP(i)) {
            
format(Strsizeof(Str), "/VIPs/%s.ini"PlayerName(i));
            if(
gettime() > DOF2_GetInt(Str"Vencimento")) {
                
SendClientMessage(i, -1"Seu VIP acaba de expirar!");
                
RemoverV(i);
                continue;
            }
            new 
cor DOF2_GetInt(Str"CorVIP");
            
SetPlayerChatBubble(i"VIP"cor == ? (0xFF00FFFF) : cor == ? (0xFFFF00FF) : cor == ? (0xFFA500FF) : cor == ? (0x00FF00FF) : cor == ? (0x00FFFFFF) : cor == ? (0x0000FFFF) : cor == ? (0xB5B5B5FF) : cor == ? (0xFF0000FF) : (-1), 50.010000);
        }
    }
}

@
_CallBackChatVIP(COLORTextoVIP[], playerid) {
    for(new 
0MAX_PLAYERSi++) {
        if(
IsPlayerConnected(i)) {
            if(
IsPlayerVIP(i)) {
                
SendClientMessage(iCOLORTextoVIP);
            }
        }
    }
    return 
1;
}

stock SetarV(playeriddias) {
    
format(Strsizeof(Str), "/VIPs/%s.ini"PlayerName(playerid));
    if(!
IsPlayerVIP(playerid)) {
        
DOF2_CreateFile(Str);
        
DOF2_SetInt(Str"Vencimento", (gettime() + (dias 86400)));
        
DOF2_SetInt(Str"CorVIP"1);
        
DOF2_SaveFile();
    } else {
        
DOF2_SetInt(Str"Vencimento", (DOF2_GetInt(Str"Vencimento") + (dias 86400)));
        
DOF2_SaveFile();
    }
    return 
1;
}

stock RemoverV(playerid) {
    
format(Strsizeof(Str), "/VIPs/%s.ini"PlayerName(playerid));
    
DOF2_RemoveFile(Str);
    return 
1;
}

stock IsPlayerVIP(playerid) {
    
format(Strsizeof(Str), "/VIPs/%s.ini"PlayerName(playerid));
    if(
DOF2_FileExists(Str)) return 1;
    return 
0;
}

stock PlayerName(playerid) {
    new 
Nome[MAX_PLAYER_NAME];
    
GetPlayerName(playeridNome24);
    return 
Nome;
}

stock convertTimestamptimestamp_form=) {
    
timestamp -= 10800;
    new 
year 1970day 0month 0hour 0mins 0sec 0returnstring[32];

    new 
days_of_month[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 };
    new 
names_of_month[12][10] = {"Janeiro","Fevereiro","Marзo","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"};

    while(
timestamp>31622400){
        
timestamp -= 31536000;
        if (((
year == 0) && (year 100 != 0)) || (year 400 == 0) ) timestamp -= 86400;
        
year++;
    }

    if (((
year == 0) && (year 100 != 0)) || (year 400 == 0)) days_of_month[1] = 29;
     else 
days_of_month[1] = 28;


    while(
timestamp>86400){
        
timestamp -= 86400day++;
        if(
day == days_of_month[month]) day=0month++;
    }

    while(
timestamp 60){
        
timestamp -= 60mins++;
        if(
mins == 60mins 0hour++;
    }

    
sec timestamp;

    switch( 
_form ){
        case 
1format(returnstring31"%02d/%02d/%d %02d:%02d:%02d"day+1month+1yearhourminssec);
        case 
2format(returnstring31"%s %02d, %d, %02d:%02d:%02d"names_of_month[month],day+1,yearhourminssec);
        case 
3format(returnstring31"%d %c%c%c %d, %02d:%02d"day+1,names_of_month[month][0],names_of_month[month][1],names_of_month[month][2], year,hour,mins);
        case 
4format(returnstring31"%02d.%02d.%d-%02d:%02d:%02d"day+1month+1yearhourminssec);
        default: 
format(returnstring31"%02d:%02d:%02d %02d/%02d/%d"hourminssecday+1month+1year);
    }

    return 
returnstring;

Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)