// Sstema vip feito por xxRaioxx.
// Todos os crйditos a min (xxRaioxx)
//Comandos:
// | /darvip , /tirarvip , /chatvip , /kitvip , /nitro , /irp , /mudarskin , /eusouvip , /infovip |
#define FILTERSCRIPT
#include a_samp
#include zcmd
#include dof2
#include sscanf
//--------[> Levels-VIP <]--------
#define Vip_Prata 1
#define Vip_Bronze 2
#define Vip_Ouro 3
#define Vip_Diamante 4
//--------[> Cores <]--------
#define Vermelho 0xD30000FF
#define Ciano 0x00FFFFFF
#define Verde 0x006D00FF
//--------[> Custa <]--------
#define CustaVip 15000
enum PlayerVip
{
Vip
}
new pVip[MAX_PLAYERS][PlayerVip];
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------Iniciado em 03/08/2013");
print(" Sistema VIP by xxRaioxx");
print("--------Terminado em 17/08/2013\n");
return 1;
}
public OnFilterScriptExit()
{
DOF2_Exit();
return 1;
}
#endif
public OnPlayerConnect(playerid)
{
new arquivei[34], nomepv[MAX_PLAYER_NAME];
GetPlayerName(playerid, nomepv, sizeof(nomepv));
format(arquivei, sizeof(arquivei), "Vips/%s", nomepv);
pVip[playerid][Vip] = DOF2_GetInt(arquivei, "Vip");
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new arquives[34], nomevip[MAX_PLAYER_NAME];
GetPlayerName(playerid, nomevip, sizeof(nomevip));
format(arquives, sizeof(arquives), "Vips/%s", nomevip);
if(DOF2_FileExists(arquives))
{
DOF2_SetInt(arquives, "Vip", pVip[playerid][Vip]);
DOF2_SaveFile();
}
else
{
DOF2_CreateFile(arquives);
DOF2_SetInt(arquives, "Vip", pVip[playerid][Vip]);
DOF2_SaveFile();
}
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
CMD:infovip(playerid)
{
SendClientMessage(playerid, Ciano, "Todos leveis vip custam 15 mil");
return 1;
}
CMD:darvip(playerid, params[])
{
new id, vip, string[256], ganhouvip[MAX_PLAYER_NAME];
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xAD0000AA, "{00E5FF}Vocк nгo estб autorizado a usar este Comando.");
if(sscanf(params, "ud", id, vip)) return SendClientMessage(playerid, 0xAD0000AA, "Use /darvip [ID] [LEVEL]");
if (vip < 1 || vip > 4) return SendClientMessage(playerid, 0xFF0000FF, "Level invбlido. Use de 1 a 4");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xAD0000AA, "Este jogador nгo estб online.");
GetPlayerName(id, ganhouvip, sizeof(ganhouvip));
format(string, sizeof(string), "Vocк deu Vip %s para o %s", LevelVip(vip), ganhouvip);
SendClientMessage(playerid, 0x00F6F6AA, string);
pVip[id][Vip] = vip;
GivePlayerMoney(id, CustaVip);
return 1;
}
CMD:tirarvip(playerid, params[])
{
new id, string[256], string1[256], admintirou[MAX_PLAYER_NAME], ganhouvip[MAX_PLAYER_NAME];
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Vermelho, "{00E5FF}Vocк nгo estб autorizado a usar este Comando.");
if(sscanf(params, "u", id)) return SendClientMessage(playerid, Verde, "Use /tirarvip [ID]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xAD0000AA, "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 %s .", ganhouvip);
SendClientMessage(playerid, 0x00F6F6AA, string);
format(string1, sizeof(string1), "O admin %s tirou o seu vip .", admintirou);
SendClientMessage(playerid, 0x00F6F6AA, string1);
pVip[id][Vip] = 0;
return 1;
}
CMD:kitvip(playerid)
{
if(pVip[playerid][Vip] < 1) return SendClientMessage(playerid, Vermelho, "Vocк nгo й vip!");
GivePlayerWeapon(playerid, 4, 1000);
GivePlayerWeapon(playerid, 24, 1000);
GivePlayerWeapon(playerid, 27, 1000);
GivePlayerWeapon(playerid, 29, 1000);
GivePlayerWeapon(playerid, 31, 1000);
GivePlayerWeapon(playerid, 38, 1000);
GivePlayerWeapon(playerid, 36, 1000);
GivePlayerWeapon(playerid, 18, 1000);
GivePlayerWeapon(playerid, 34, 1000);
SendClientMessage(playerid, Ciano, "Vocк pegou um kit vip!");
return 1;
}
CMD:chatvip(playerid, params[])
{
if(pVip[playerid][Vip] < 1) return SendClientMessage(playerid, 0xAD0000AA, "Vocк nгo й Vip!");
new text[128], string[128], playern[MAX_PLAYER_NAME];
if(sscanf(params, "s", text)) return SendClientMessage(playerid, Vermelho, "Use /chatvip [MENSAGEM]");
GetPlayerName(playerid, playern, sizeof(playern));
format(string, sizeof(string), "(Chat Vip) %s diz: %s", playern, text);
SendFamilyMessage( string);
return 1;
}
CMD:nitro(playerid, params[])
{
if(pVip[playerid][Vip] < 2) return SendClientMessage(playerid, Vermelho, "Vocк nгo й vip maior que level 1 ! ");
new carro;
carro = GetPlayerVehicleID(playerid);
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, Verde,"Vocк nгo estб em nenhum carro!");
AddVehicleComponent(carro, 1010);
SendClientMessage(playerid, Ciano, "Vocк colocou nitro no carro.");
return 1;
}
CMD:irp(playerid, params[])
{
if(pVip[playerid][Vip] < 3) return SendClientMessage(playerid, Vermelho, "Vocк й vip level menor que 3!");
new id, Float: x, Float: y, Float: z, string[256], string1[256], nomeplayer[MAX_PLAYER_NAME], nomepvip[MAX_PLAYER_NAME];
if(sscanf(params, "u", id)) return SendClientMessage(playerid, Verde,"Use /irp [ID]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, Vermelho,"Este jogador nгo estб online.");
GetPlayerName(playerid, nomepvip, sizeof(nomepvip));
GetPlayerName(id, nomeplayer, sizeof(nomeplayer));
format(string, sizeof(string), "Vocк foi atй atй ao jogador %s.", nomeplayer);
format(string1, sizeof(string1), "O vip %s foi atй vocк.", nomepvip);
SendClientMessage(playerid, Ciano, string);
SendClientMessage(id, Ciano, string1);
GetPlayerPos(id, x, y, z);
SetPlayerPos(playerid, x+1, y+1, z);
return 1;
}
CMD:mudarskin(playerid, params[])
{
if(pVip[playerid][Vip] != 4) return SendClientMessage(playerid, Vermelho, "Vocк nгo й vip level 4 ! ");
new skinid, string[128];
if(sscanf(params, "i", skinid)) return SendClientMessage(playerid, Ciano,"Use /mudarskin [id da skin]");
format(string, sizeof(string), "Vocк mudou sua skin para a id %d.", skinid);
SendClientMessage(playerid, Ciano, string);
SetPlayerSkin(playerid, skinid);
return 1;
}
CMD:eusouvip(playerid)
{
if(pVip[playerid][Vip] < 1) return SendClientMessage(playerid, Vermelho, "Vocк nгo й vip! ");
new id, eunome[MAX_PLAYER_NAME], string[256];
GetPlayerName(id, eunome, sizeof(eunome));
format(string, sizeof(string), "Eu %s sou vip entгo me chupa!", eunome);
SendClientMessageToAll(Verde, string);
return 1;
}
stock LevelVip(vipid)
{
new str[50];
if(vipid == 1)
{
str = "Prata";
}
else if (vipid == 2)
{
str = "Bronze";
}
else if (vipid == 3)
{
str = "Ouro";
}
else if (vipid == 4)
{
str = "Diamante";
}
return str;
}
stock SendFamilyMessage(mensagem[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(pVip[i][Vip] > 1)
{
SendClientMessage(i, Ciano, mensagem);
}
}
}
return 0;
}
po fera podia faze um sistema vip que vence sozinho nй fora isso ta top
|
O mlk й novo, tб aprendendo ainda.
~ Bom FS. Poderia idealiza-lo mais, adicionar mais coisas. Vantagens reais para ser vip caso for para o ar em algum servidor. |