07.10.2013, 15:54
Bom Galera , eu baixei um FS de sistema de VIP aqui e ta dando apenas 1 erro , e nao sei resolver , eu ja tenho a include DOF2 mais mesmo assim o erro persiste ...
O FS Й ESTE AQUI QUE EU BAIXEI
Quote:
C:\Users\moises\Pictures\[]N3G[]\samp03x_svr_R1-2_win32\filterscripts\UltimateVip.pwn(2) : fatal error 100: cannot read from file: "DOF2" Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. |
PHP код:
#include <a_samp>
#include <DOF2>
#include <zcmd>
#include <sscanf>
#define Maximo_Players 100
#define Preco_Vip 10
#define Dial_Vip 7000
new VIP[Maximo_Players];
new Spawnou[Maximo_Players];
new Fala[128];
new Nome[24];
public OnFilterScriptInit()
{
print("Ultimate VIP 0.3x iniciado.");
print("Criador: Biel_COP.");
return 1;
}
public OnFilterScriptExit()
{
print("Ultimate VIP 0.3x encerrado.");
print("Criador: Biel_COP.");
DOF2_Exit();
return 1;
}
public OnPlayerConnect(playerid)
{
GetPlayerName(playerid,Nome,sizeof(Nome));
format(Fala,sizeof(Fala),"Vips/%s.ini",Nome);
if(DOF2_FileExists(Fala))
{
VIP[playerid] = 1;
SetTimerEx("AtualizarVip",10000,1,"i",playerid);
}
return 1;
}
public OnPlayerDisconnect(playerid,reason)
{
VIP[playerid] = 0;
Spawnou[playerid] = 0;
GetPlayerName(playerid,Nome,sizeof(Nome));
format(Fala,sizeof(Fala),"Vips/%s.ini",Nome);
if(DOF2_FileExists(Fala))
{
DOF2_SaveFile();
}
return 1;
}
public OnPlayerSpawn(playerid)
{
Spawnou[playerid] = 1;
if(VIP[playerid] == 1)
{
GameTextForPlayer(playerid,"~r~Voce e um~n~Player VIP~n~Aproveite",5000,3);
}
return 1;
}
public OnVehicleDamageStatusUpdate(vehicleid,playerid)
{
if(VIP[playerid] == 1)
{
GameTextForPlayer(playerid,"~r~Veiculo Reparado",1000,3);
RepairVehicle(vehicleid);
}
return 1;
}
public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[])
{
if(dialogid == Dial_Vip)
{
if(response)
{
if(!strlen(inputtext))
{
ShowPlayerDialog(playerid,Dial_Vip,DIALOG_STYLE_MSGBOX,"Bate Papo VIP","Escreva o texto no campo abaixo","Escrever","Cancelar");
}
else
{
for(new i=0; i<Maximo_Players; i++)
{
if(IsPlayerConnected(i))
{
if(VIP[i] == 1)
{
GetPlayerName(playerid,Nome,sizeof(Nome));
format(Fala,sizeof(Fala),"VIP %s: %s",Nome,inputtext);
SendClientMessage(i,0xEDB2DEAA,Fala);
}
}
}
}
return 1;
}
}
return 1;
}
forward RemoverVip(playerid);
public RemoverVip(playerid)
{
VIP[playerid] = 0;
GetPlayerName(playerid,Nome,sizeof(Nome));
format(Fala,sizeof(Fala),"Vips/%s.ini",Nome);
if(DOF2_FileExists(Fala))
{
DOF2_RemoveFile(Fala);
}
return 1;
}
forward AtualizarVip(playerid);
public AtualizarVip(playerid)
{
if(VIP[playerid] == 1 && Spawnou[playerid] == 1)
{
GetPlayerName(playerid,Nome,sizeof(Nome));
format(Fala,sizeof(Fala),"Vips/%s.ini",Nome);
if(DOF2_FileExists(Fala))
{
new Hoje = getdate();
new Vencimento = DOF2_GetInt(Fala,"Vencimento");
new Dias = DOF2_GetInt(Fala,"Dias");
if(Hoje-Vencimento >= Dias)
{
format(Fala,sizeof(Fala),"Olб %s, seu VIP expirou.\n\nPossнvel motivo: Vencimento.\n\nEsperamos que tenha aproveitado!\n\nPreзo do VIP: R$ %d,00",Nome,Preco_Vip);
ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"VIP Expirado",Fala,"Cancelar","");
RemoverVip(playerid);
}
}
else
{
format(Fala,sizeof(Fala),"Olб %s, seu VIP expirou.\n\nPossнvel motivo: Sua conta na pasta nгo existe mais.\n\nEsperamos que tenha aproveitado!\n\nPreзo do VIP: R$ %d,00",Nome,Preco_Vip);
ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"VIP Expirado",Fala,"Cancelar","");
RemoverVip(playerid);
}
}
return 1;
}
CMD:vips(playerid)
{
SendClientMessage(playerid,0xBFBFBFAA,"Vips Online:");
for(new i=0; i<Maximo_Players; i++)
{
if(IsPlayerConnected(i))
{
if(VIP[i] == 1)
{
format(Fala,sizeof(Fala),"VIP: %s.",Nome);
SendClientMessage(playerid,0xBBFF00AA,Fala);
}
}
}
return 1;
}
CMD:armasvip(playerid)
{
if(VIP[playerid] == 1)
{
SetPlayerHealth(playerid,100.0);
SetPlayerArmour(playerid,100.0);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,24,700);
GivePlayerWeapon(playerid,25,300);
GivePlayerWeapon(playerid,29,500);
GivePlayerWeapon(playerid,31,500);
GivePlayerWeapon(playerid,34,100);
GivePlayerWeapon(playerid,39,50);
GivePlayerWeapon(playerid,40,50);
GameTextForPlayer(playerid,"~r~Equipamentos Adquiridos",5000,3);
}
return 1;
}
CMD:roupavip(playerid,params[])
{
if(VIP[playerid] == 1)
{
new ID;
if(!sscanf(params,"d",ID))
{
SendClientMessage(playerid,0xBFBFBFAA,"Use: /roupavip ID.");
return 1;
}
if(ID > 299)
{
if(ID < 0)
{
SendClientMessage(playerid,0xBFBFBFAA,"Roupas de 0 a 299.");
return 1;
}
}
else
{
SetPlayerSkin(playerid,ID);
GameTextForPlayer(playerid,"~r~Roupa Trocada",5000,3);
}
}
return 1;
}
CMD:majvip(playerid)
{
if(VIP[playerid] == 1)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
GameTextForPlayer(playerid,"~r~Mochila a Jato~n~Adquirida",5000,3);
}
return 1;
}
CMD:vip(playerid)
{
if(VIP[playerid] == 1)
{
ShowPlayerDialog(playerid,Dial_Vip,DIALOG_STYLE_LIST,"Bate Papo VIP","Escreva o texto no campo abaixo","Escrever","Cancelar");
}
return 1;
}
CMD:meuvip(playerid)
{
GetPlayerName(playerid,Nome,sizeof(Nome));
format(Fala,sizeof(Fala),"Vips/%s.ini",Nome);
if(DOF2_FileExists(Fala))
{
new Fala2[140];
new Hoje = getdate();
new Vencimento = DOF2_GetInt(Fala,"Vencimento");
format(Fala2,sizeof(Fala2),"Olб %s!\n\nO admin cujo setou seu VIP, setou %d dias.\n\nE vocк Jб usou %d dias com o mesmo!\n\nAproveite antes que acabe!",Nome,DOF2_GetInt(Fala,"Dias"),Hoje-Vencimento);
ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"Seu VIP",Fala2,"Cancelar","");
}
return 1;
}
CMD:creditosvip(playerid)
{
ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"Ultimate VIP 0.3x","Criado por Biel_COP.\n\nAjuda inicial de Paulo Ricardo.\n\nUV 0.3x criado a partir de vбrios pedidos de usuбrios do Fуrum Samp.","Cancelar","");
return 1;
}
CMD:ajudavip(playerid)
{
if(VIP[playerid] == 1)
{
ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"Ajuda VIP","/vips, /armasvip, /roupavip\n\n/majvip, /vip, /meuvip\n\n/creditosvip, /ajudavip, /planosvip","Cancelar","");
}
if(IsPlayerAdmin(playerid))
{
SendClientMessage(playerid,0xFFFF00AA,"/darvip, /removervip");
}
return 1;
}
CMD:planosvip(playerid)
{
format(Fala,sizeof(Fala),"O VIP custa R$ %d,00.\n\nAproveite e compre!",Preco_Vip);
ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"Planos VIP",Fala,"Cancelar","");
return 1;
}
CMD:darvip(playerid,params[])
{
if(IsPlayerAdmin(playerid))
{
new ID;
new Dias;
if(!sscanf(params,"dd",ID,Dias))
{
SendClientMessage(playerid,0xBFBFBFAA,"Use: /darvip ID Dias.");
return 1;
}
if(!IsPlayerConnected(ID))
{
SendClientMessage(playerid,0xBFBFBFAA,"Player nгo online.");
return 1;
}
else
{
if(VIP[ID] == 1)
{
SendClientMessage(playerid,0xBFBFBFAA,"O mesmo Jб й VIP.");
return 1;
}
else
{
GetPlayerName(ID,Nome,sizeof(Nome));
format(Fala,sizeof(Fala),"Vips/%s.ini",Nome);
DOF2_CreateFile(Fala);
DOF2_SetInt(Fala,"Vencimento",getdate());
DOF2_SetInt(Fala,"Dias",Dias);
DOF2_SaveFile();
VIP[ID] = 1;
format(Fala,sizeof(Fala),"O administrador deu VIP para o player %s por %d dias.",Nome,Dias);
SendClientMessageToAll(0xFF8080AA,Fala);
}
}
}
return 1;
}
CMD:removervip(playerid,params[])
{
if(IsPlayerAdmin(playerid))
{
new ID;
if(!sscanf(params,"d",ID))
{
SendClientMessage(playerid,0xBFBFBFAA,"Use: /removervip ID.");
return 1;
}
if(!IsPlayerConnected(ID))
{
SendClientMessage(playerid,0xBFBFBFAA,"Player nгo online.");
return 1;
}
else
{
if(VIP[ID] == 0)
{
SendClientMessage(playerid,0xBFBFBFAA,"O mesmo nгo й VIP.");
return 1;
}
else
{
GetPlayerName(ID,Nome,sizeof(Nome));
format(Fala,sizeof(Fala),"Vips/%s.ini",Nome);
DOF2_RemoveFile(Fala);
VIP[ID] = 0;
format(Fala,sizeof(Fala),"O administrador removeu o VIP do player %s.",Nome);
SendClientMessageToAll(0xFF8080AA,Fala);
}
}
}
return 1;
}