Esse sistema vip e do GM DTEN funciona perfeitamente vc pode setar dias vip com ele vc vai precisar da include
Код:
#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;
}
caso manden eu tirar esse codigo e a include vгo ser tirada sem aviso porque nгo e meu essa invenзгo OK>>