/*=========================================================================== Filterscript programado por [NRG]Dark dark_eagn@hotmail.com "O Plбgio й a caracterнstica principal de imbecis sem criatividade" Diga nгo ao plбgio!! ===========================================================================*/ #define FILTERSCRIPT #include <a_samp> #include <streamer> #include <DOF2> #include <zcmd> #include <sscanf2> #define PASTA_ARVORES "/Natal/Arvore%d.ini" #define MAX_ARVORES 25 #define Vermelho 0xFF0000AA forward CriarArvore(Float:X,Float:Y,Float:Z); forward DeletarArvore(arvoreid); forward CarregarArvores(); new Chapeu[MAX_PLAYERS]; new Arvore[MAX_ARVORES][4]; new ProximaArvore; new arquivo[128]; new Text3D:Id[MAX_ARVORES]; new cmd[256]; public OnFilterScriptInit() { print(" [FS] Natal Carregado"); CarregarArvores(); SetTimer("Mensagem",300000,1); return 1; } public OnFilterScriptExit() { print(" [FS] Natal Descarregado"); DOF2_Exit(); return 1; } CMD:criararvore(playerid, params[]) { if(IsPlayerAdmin(playerid)){ new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid,X,Y,Z); for(new i=0;i<=MAX_ARVORES;i++){ format(arquivo,sizeof(arquivo),PASTA_ARVORES,i); if(!DOF2_FileExists(arquivo)){ DOF2_CreateFile(arquivo); DOF2_SetFloat(arquivo,"posX",X); DOF2_SetFloat(arquivo,"posX",X); DOF2_SetFloat(arquivo,"posY",Y); DOF2_SetFloat(arquivo,"posZ",Z); CriarArvore(X,Y,Z); SendClientMessage(playerid,-1,"Arvore Criada!"); return 1; } } SendClientMessage(playerid,Vermelho,"Limite de arvores atingido!"); } return 1; } CMD:excluirarvore(playerid, params[]) { if (IsPlayerAdmin(playerid)) { new arvoreid; if (sscanf(params, "d", arvoreid)) { SendClientMessage(playerid, 0x008040AA, "(ERRO) Use: /excluirarvore [id]."); return 1; } else { if (arvoreid < 0 || arvoreid > MAX_ARVORES) return SendClientMessage(playerid, Vermelho, "Id Invбlido!"); DeletarArvore(arvoreid); SendClientMessage(playerid, -1, "Arvore Excluida!"); } } return 1; } CMD:comandosnatal(playerid, params[]) { if(IsPlayerAdmin(playerid)){ SendClientMessage(playerid,0xFF0000AA,"========== Comandos Natal ==========="); SendClientMessage(playerid,0xFFFFFFAA,"/criararvore"); SendClientMessage(playerid,0xFFFFFFAA,"/excluirarvore"); SendClientMessage(playerid,0xFFFFFFAA,"/mostrarids - /ocultarids"); SendClientMessage(playerid,0xFF0000AA,"========== Comandos Natal ==========="); } return 1; } CMD:chapeu(playerid, params[]) { if(Chapeu[playerid]==0){ SetPlayerAttachedObject(playerid,1,19066,2,0.13,0.0,0.0,90,90.0,0.0); Chapeu[playerid] = 1; SendClientMessage(playerid,-1,"Chapйu de Natal On"); }else{ RemovePlayerAttachedObject(playerid,1); SendClientMessage(playerid,-1,"Chapйu de Natal Off"); Chapeu[playerid] = 0; } return 1; } CMD:ocultarids(playerid, params[]) { if(IsPlayerAdmin(playerid)){ OcultarIds(); SendClientMessage(playerid,-1,"Ids Ocultados!"); } return 1; } CMD:mostrarids(playerid, params[]) { if(IsPlayerAdmin(playerid)){ MostrarIds(); SendClientMessage(playerid,-1,"Ids Exibidos!"); } return 1; } public CriarArvore(Float:X,Float:Y,Float:Z) { Arvore[ProximaArvore][0] = CreateDynamicObject(19076, X-0.39, Y+0.67, Z-0.9, 0.00, 0.00, 0.00); //Arvore Arvore[ProximaArvore][1] = CreateDynamicObject(19056, X-1.39, Y+0.10, Z-0.2, 0.00, 0.00, 0.00); Arvore[ProximaArvore][2] = CreateDynamicObject(19057, X+1.39, Y+0.45, Z-0.2, 0.00, 0.00, 0.00); Arvore[ProximaArvore][3] = CreateDynamicObject(19054, X-0.07, Y-0.67, Z-0.2, 0.00, 0.00, 0.00); ProximaArvore++; return (ProximaArvore-1); } public DeletarArvore(arvoreid) { DestroyDynamicObject(Arvore[arvoreid][0]); DestroyDynamicObject(Arvore[arvoreid][1]); DestroyDynamicObject(Arvore[arvoreid][2]); DestroyDynamicObject(Arvore[arvoreid][3]); format(arquivo,128,PASTA_ARVORES,arvoreid); DOF2_RemoveFile(arquivo); ProximaArvore--; return 1; } public CarregarArvores() { new string[128]; new counter; for(new i=0;i<=MAX_ARVORES;i++){ format(string,sizeof(string),PASTA_ARVORES,i); if(DOF2_FileExists(string)){ CriarArvore(DOF2_GetFloat(string,"posX"),DOF2_GetFloat(string,"posY"),DOF2_GetFloat(string,"posZ")); counter++; } } format(string,sizeof(string),"%d бrvores de natal carregadas!!",counter); if(counter>0) print(string); return 1; } stock MostrarIds() { new str[50]; for(new i=0;i<=MAX_ARVORES;i++){ format(arquivo,128,PASTA_ARVORES,i); if(DOF2_FileExists(arquivo)){ format(str,50,"Arvore id: %d",i); Id[i] = Create3DTextLabel(str,0xFFFF80AA,DOF2_GetFloat(arquivo,"posX"),DOF2_GetFloat(arquivo,"posY"),DOF2_GetFloat(arquivo,"posZ"),20.0,0); } } return 1; } stock OcultarIds() { for(new i=0;i<=MAX_ARVORES;i++){ Delete3DTextLabel(Id[i]); } return 1; } forward Mensagem(); public Mensagem(){ SendClientMessageToAll(0xFF8000AA,"Nossa Equipe Deseja a todos um Feliz Natal!! Use /chapeu"); return 1; } public OnPlayerCommandReceived(playerid, cmdtext[]) { cmd = #; strcat(cmd, cmdtext); return 1; }
#define dini_Exists DOF2_FileExists
#define dini_Remove DOF2_RemoveFile
#define dini_Create DOF2_CreateFile
#define dini_Set DOF2_SetString
#define dini_Get DOF2_GetString
#define dini_IntSet DOF2_SetInt
#define dini_Int DOF2_GetInt
#define dini_BoolSet DOF2_SetBool
#define dini_Bool DOF2_GetBool
#define dini_FloatSet DOF2_SetFloat
#define dini_Float DOF2_GetFloat
#define dini_Unset DOF2_Unset
#define dini_Isset DOF2_IsSet
/*===========================================================================
Filterscript programado por [NRG]Dark
dark_eagn@hotmail.com
"O Plбgio й a caracterнstica principal de imbecis sem criatividade"
Diga nгo ao plбgio!!
===========================================================================*/
#define FILTERSCRIPT
#include <a_samp>
#include <streamer>
#include <dini>
#include <zcmd>
#include <sscanf2>
#define PASTA_ARVORES "/Natal/Arvore%d.ini"
#define MAX_ARVORES 25
#define Vermelho 0xFF0000AA
forward CriarArvore(Float:X,Float:Y,Float:Z);
forward DeletarArvore(arvoreid);
forward CarregarArvores();
new Chapeu[MAX_PLAYERS];
new Arvore[MAX_ARVORES][4];
new ProximaArvore;
new arquivo[128];
new Text3D:Id[MAX_ARVORES];
new cmd[256];
public OnFilterScriptInit()
{
print(" [FS] Natal Carregado");
CarregarArvores();
SetTimer("Mensagem",300000,1);
return 1;
}
public OnFilterScriptExit()
{
print(" [FS] Natal Descarregado");
return 1;
}
CMD:criararvore(playerid, params[]) {
if(IsPlayerAdmin(playerid)){
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
for(new i=0;i<=MAX_ARVORES;i++){
format(arquivo,sizeof(arquivo),PASTA_ARVORES,i);
if(!dini_Exists(arquivo)){
dini_Create(arquivo);
dini_FloatSet(arquivo,"posX",X);
dini_FloatSet(arquivo,"posX",X);
dini_FloatSet(arquivo,"posY",Y);
dini_FloatSet(arquivo,"posZ",Z);
CriarArvore(X,Y,Z);
SendClientMessage(playerid,-1,"Arvore Criada!");
return 1;
}
}
SendClientMessage(playerid,Vermelho,"Limite de arvores atingido!");
}
return 1;
}
CMD:excluirarvore(playerid, params[]) {
if (IsPlayerAdmin(playerid)) {
new arvoreid;
if (sscanf(params, "d", arvoreid)) {
SendClientMessage(playerid, 0x008040AA, "(ERRO) Use: /excluirarvore [id].");
return 1;
} else {
if (arvoreid < 0 || arvoreid > MAX_ARVORES) return SendClientMessage(playerid, Vermelho, "Id Invбlido!");
DeletarArvore(arvoreid);
SendClientMessage(playerid, -1, "Arvore Excluida!");
}
}
return 1;
}
CMD:comandosnatal(playerid, params[]) {
if(IsPlayerAdmin(playerid)){
SendClientMessage(playerid,0xFF0000AA,"========== Comandos Natal ===========");
SendClientMessage(playerid,0xFFFFFFAA,"/criararvore");
SendClientMessage(playerid,0xFFFFFFAA,"/excluirarvore");
SendClientMessage(playerid,0xFFFFFFAA,"/mostrarids - /ocultarids");
SendClientMessage(playerid,0xFF0000AA,"========== Comandos Natal ===========");
}
return 1;
}
CMD:chapeu(playerid, params[]) {
if(Chapeu[playerid]==0){
SetPlayerAttachedObject(playerid,1,19066,2,0.13,0.0,0.0,90,90.0,0.0);
Chapeu[playerid] = 1;
SendClientMessage(playerid,-1,"Chapйu de Natal On");
}else{
RemovePlayerAttachedObject(playerid,1);
SendClientMessage(playerid,-1,"Chapйu de Natal Off");
Chapeu[playerid] = 0;
}
return 1;
}
CMD:ocultarids(playerid, params[]) {
if(IsPlayerAdmin(playerid)){
OcultarIds();
SendClientMessage(playerid,-1,"Ids Ocultados!");
}
return 1;
}
CMD:mostrarids(playerid, params[]) {
if(IsPlayerAdmin(playerid)){
MostrarIds();
SendClientMessage(playerid,-1,"Ids Exibidos!");
}
return 1;
}
public CriarArvore(Float:X,Float:Y,Float:Z)
{
Arvore[ProximaArvore][0] = CreateDynamicObject(19076, X-0.39, Y+0.67, Z-0.9, 0.00, 0.00, 0.00); //Arvore
Arvore[ProximaArvore][1] = CreateDynamicObject(19056, X-1.39, Y+0.10, Z-0.2, 0.00, 0.00, 0.00);
Arvore[ProximaArvore][2] = CreateDynamicObject(19057, X+1.39, Y+0.45, Z-0.2, 0.00, 0.00, 0.00);
Arvore[ProximaArvore][3] = CreateDynamicObject(19054, X-0.07, Y-0.67, Z-0.2, 0.00, 0.00, 0.00);
ProximaArvore++;
return (ProximaArvore-1);
}
public DeletarArvore(arvoreid)
{
DestroyDynamicObject(Arvore[arvoreid][0]);
DestroyDynamicObject(Arvore[arvoreid][1]);
DestroyDynamicObject(Arvore[arvoreid][2]);
DestroyDynamicObject(Arvore[arvoreid][3]);
format(arquivo,128,PASTA_ARVORES,arvoreid);
dini_Remove(arquivo);
ProximaArvore--;
return 1;
}
public CarregarArvores()
{
new string[128];
new counter;
for(new i=0;i<=MAX_ARVORES;i++){
format(string,sizeof(string),PASTA_ARVORES,i);
if(dini_Exists(string)){
CriarArvore(dini_Float(string,"posX"),dini_Float(string,"posY"),dini_Float(string,"posZ"));
counter++;
}
}
format(string,sizeof(string),"%d бrvores de natal carregadas!!",counter);
if(counter>0) print(string);
return 1;
}
stock MostrarIds()
{
new str[50];
for(new i=0;i<=MAX_ARVORES;i++){
format(arquivo,128,PASTA_ARVORES,i);
if(dini_Exists(arquivo)){
format(str,50,"Arvore id: %d",i);
Id[i] = Create3DTextLabel(str,0xFFFF80AA,dini_Float(arquivo,"posX"),dini_Float(arquivo,"posY"),dini_Float(arquivo,"posZ"),20.0,0);
}
}
return 1;
}
stock OcultarIds()
{
for(new i=0;i<=MAX_ARVORES;i++){
Delete3DTextLabel(Id[i]);
}
return 1;
}
forward Mensagem();
public Mensagem(){
SendClientMessageToAll(0xFF8000AA,"Nossa Equipe Deseja a todos um Feliz Natal!! Use /chapeu");
return 1;
}
public OnPlayerCommandReceived(playerid, cmdtext[])
{
cmd = #;
strcat(cmd, cmdtext);
return 1;
}
Alguem pode mudar esta filterscript de natal de DOF2 para Dini? Jб tentei e nгo consegui. Mudei as includes talz, mais n vai.
Код:
/*=========================================================================== Filterscript programado por [NRG]Dark dark_eagn@hotmail.com "O Plбgio й a caracterнstica principal de imbecis sem criatividade" Diga nгo ao plбgio!! ===========================================================================*/ #define FILTERSCRIPT #include <a_samp> #include <streamer> #include <DOF2> #include <zcmd> #include <sscanf2> #define PASTA_ARVORES "/Natal/Arvore%d.ini" #define MAX_ARVORES 25 #define Vermelho 0xFF0000AA forward CriarArvore(Float:X,Float:Y,Float:Z); forward DeletarArvore(arvoreid); forward CarregarArvores(); new Chapeu[MAX_PLAYERS]; new Arvore[MAX_ARVORES][4]; new ProximaArvore; new arquivo[128]; new Text3D:Id[MAX_ARVORES]; new cmd[256]; public OnFilterScriptInit() { print(" [FS] Natal Carregado"); CarregarArvores(); SetTimer("Mensagem",300000,1); return 1; } public OnFilterScriptExit() { print(" [FS] Natal Descarregado"); DOF2_Exit(); return 1; } CMD:criararvore(playerid, params[]) { if(IsPlayerAdmin(playerid)){ new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid,X,Y,Z); for(new i=0;i<=MAX_ARVORES;i++){ format(arquivo,sizeof(arquivo),PASTA_ARVORES,i); if(!DOF2_FileExists(arquivo)){ DOF2_CreateFile(arquivo); DOF2_SetFloat(arquivo,"posX",X); DOF2_SetFloat(arquivo,"posX",X); DOF2_SetFloat(arquivo,"posY",Y); DOF2_SetFloat(arquivo,"posZ",Z); CriarArvore(X,Y,Z); SendClientMessage(playerid,-1,"Arvore Criada!"); return 1; } } SendClientMessage(playerid,Vermelho,"Limite de arvores atingido!"); } return 1; } CMD:excluirarvore(playerid, params[]) { if (IsPlayerAdmin(playerid)) { new arvoreid; if (sscanf(params, "d", arvoreid)) { SendClientMessage(playerid, 0x008040AA, "(ERRO) Use: /excluirarvore [id]."); return 1; } else { if (arvoreid < 0 || arvoreid > MAX_ARVORES) return SendClientMessage(playerid, Vermelho, "Id Invбlido!"); DeletarArvore(arvoreid); SendClientMessage(playerid, -1, "Arvore Excluida!"); } } return 1; } CMD:comandosnatal(playerid, params[]) { if(IsPlayerAdmin(playerid)){ SendClientMessage(playerid,0xFF0000AA,"========== Comandos Natal ==========="); SendClientMessage(playerid,0xFFFFFFAA,"/criararvore"); SendClientMessage(playerid,0xFFFFFFAA,"/excluirarvore"); SendClientMessage(playerid,0xFFFFFFAA,"/mostrarids - /ocultarids"); SendClientMessage(playerid,0xFF0000AA,"========== Comandos Natal ==========="); } return 1; } CMD:chapeu(playerid, params[]) { if(Chapeu[playerid]==0){ SetPlayerAttachedObject(playerid,1,19066,2,0.13,0.0,0.0,90,90.0,0.0); Chapeu[playerid] = 1; SendClientMessage(playerid,-1,"Chapйu de Natal On"); }else{ RemovePlayerAttachedObject(playerid,1); SendClientMessage(playerid,-1,"Chapйu de Natal Off"); Chapeu[playerid] = 0; } return 1; } CMD:ocultarids(playerid, params[]) { if(IsPlayerAdmin(playerid)){ OcultarIds(); SendClientMessage(playerid,-1,"Ids Ocultados!"); } return 1; } CMD:mostrarids(playerid, params[]) { if(IsPlayerAdmin(playerid)){ MostrarIds(); SendClientMessage(playerid,-1,"Ids Exibidos!"); } return 1; } public CriarArvore(Float:X,Float:Y,Float:Z) { Arvore[ProximaArvore][0] = CreateDynamicObject(19076, X-0.39, Y+0.67, Z-0.9, 0.00, 0.00, 0.00); //Arvore Arvore[ProximaArvore][1] = CreateDynamicObject(19056, X-1.39, Y+0.10, Z-0.2, 0.00, 0.00, 0.00); Arvore[ProximaArvore][2] = CreateDynamicObject(19057, X+1.39, Y+0.45, Z-0.2, 0.00, 0.00, 0.00); Arvore[ProximaArvore][3] = CreateDynamicObject(19054, X-0.07, Y-0.67, Z-0.2, 0.00, 0.00, 0.00); ProximaArvore++; return (ProximaArvore-1); } public DeletarArvore(arvoreid) { DestroyDynamicObject(Arvore[arvoreid][0]); DestroyDynamicObject(Arvore[arvoreid][1]); DestroyDynamicObject(Arvore[arvoreid][2]); DestroyDynamicObject(Arvore[arvoreid][3]); format(arquivo,128,PASTA_ARVORES,arvoreid); DOF2_RemoveFile(arquivo); ProximaArvore--; return 1; } public CarregarArvores() { new string[128]; new counter; for(new i=0;i<=MAX_ARVORES;i++){ format(string,sizeof(string),PASTA_ARVORES,i); if(DOF2_FileExists(string)){ CriarArvore(DOF2_GetFloat(string,"posX"),DOF2_GetFloat(string,"posY"),DOF2_GetFloat(string,"posZ")); counter++; } } format(string,sizeof(string),"%d бrvores de natal carregadas!!",counter); if(counter>0) print(string); return 1; } stock MostrarIds() { new str[50]; for(new i=0;i<=MAX_ARVORES;i++){ format(arquivo,128,PASTA_ARVORES,i); if(DOF2_FileExists(arquivo)){ format(str,50,"Arvore id: %d",i); Id[i] = Create3DTextLabel(str,0xFFFF80AA,DOF2_GetFloat(arquivo,"posX"),DOF2_GetFloat(arquivo,"posY"),DOF2_GetFloat(arquivo,"posZ"),20.0,0); } } return 1; } stock OcultarIds() { for(new i=0;i<=MAX_ARVORES;i++){ Delete3DTextLabel(Id[i]); } return 1; } forward Mensagem(); public Mensagem(){ SendClientMessageToAll(0xFF8000AA,"Nossa Equipe Deseja a todos um Feliz Natal!! Use /chapeu"); return 1; } public OnPlayerCommandReceived(playerid, cmdtext[]) { cmd = #; strcat(cmd, cmdtext); return 1; } |
/*===========================================================================
Filterscript programado por [NRG]Dark
dark_eagn@hotmail.com
"O Plбgio й a caracterнstica principal de imbecis sem criatividade"
Diga nгo ao plбgio!!
===========================================================================*/
#define FILTERSCRIPT
#include <a_samp>
#include <streamer>
#include <dini>
#include <zcmd>
#include <sscanf2>
#define PASTA_ARVORES "/Natal/Arvore%d.ini"
#define MAX_ARVORES 25
#define Vermelho 0xFF0000AA
forward CriarArvore(Float:X,Float:Y,Float:Z);
forward DeletarArvore(arvoreid);
forward CarregarArvores();
new Chapeu[MAX_PLAYERS];
new Arvore[MAX_ARVORES][4];
new ProximaArvore;
new arquivo[128];
new Text3D:Id[MAX_ARVORES];
new cmd[256];
public OnFilterScriptInit()
{
print(" [FS] Natal Carregado");
CarregarArvores();
SetTimer("Mensagem",300000,1);
return 1;
}
public OnFilterScriptExit()
{
print(" [FS] Natal Descarregado");
return 1;
}
CMD:criararvore(playerid, params[]) {
if(IsPlayerAdmin(playerid)){
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
for(new i=0;i<=MAX_ARVORES;i++){
format(arquivo,sizeof(arquivo),PASTA_ARVORES,i);
if(!dini_Exists(arquivo)){
dini_Create(arquivo);
dini_FloatSet(arquivo,"posX",X);
dini_FloatSet(arquivo,"posX",X);
dini_FloatSet(arquivo,"posY",Y);
dini_FloatSet(arquivo,"posZ",Z);
CriarArvore(X,Y,Z);
SendClientMessage(playerid,-1,"Arvore Criada!");
return 1;
}
}
SendClientMessage(playerid,Vermelho,"Limite de arvores atingido!");
}
return 1;
}
CMD:excluirarvore(playerid, params[]) {
if (IsPlayerAdmin(playerid)) {
new arvoreid;
if (sscanf(params, "d", arvoreid)) {
SendClientMessage(playerid, 0x008040AA, "(ERRO) Use: /excluirarvore [id].");
return 1;
} else {
if (arvoreid < 0 || arvoreid > MAX_ARVORES) return SendClientMessage(playerid, Vermelho, "Id Invбlido!");
DeletarArvore(arvoreid);
SendClientMessage(playerid, -1, "Arvore Excluida!");
}
}
return 1;
}
CMD:comandosnatal(playerid, params[]) {
if(IsPlayerAdmin(playerid)){
SendClientMessage(playerid,0xFF0000AA,"========== Comandos Natal ===========");
SendClientMessage(playerid,0xFFFFFFAA,"/criararvore");
SendClientMessage(playerid,0xFFFFFFAA,"/excluirarvore");
SendClientMessage(playerid,0xFFFFFFAA,"/mostrarids - /ocultarids");
SendClientMessage(playerid,0xFF0000AA,"========== Comandos Natal ===========");
}
return 1;
}
CMD:chapeu(playerid, params[]) {
if(Chapeu[playerid]==0){
SetPlayerAttachedObject(playerid,1,19066,2,0.13,0.0,0.0,90,90.0,0.0);
Chapeu[playerid] = 1;
SendClientMessage(playerid,-1,"Chapйu de Natal On");
}else{
RemovePlayerAttachedObject(playerid,1);
SendClientMessage(playerid,-1,"Chapйu de Natal Off");
Chapeu[playerid] = 0;
}
return 1;
}
CMD:ocultarids(playerid, params[]) {
if(IsPlayerAdmin(playerid)){
OcultarIds();
SendClientMessage(playerid,-1,"Ids Ocultados!");
}
return 1;
}
CMD:mostrarids(playerid, params[]) {
if(IsPlayerAdmin(playerid)){
MostrarIds();
SendClientMessage(playerid,-1,"Ids Exibidos!");
}
return 1;
}
public CriarArvore(Float:X,Float:Y,Float:Z)
{
Arvore[ProximaArvore][0] = CreateDynamicObject(19076, X-0.39, Y+0.67, Z-0.9, 0.00, 0.00, 0.00); //Arvore
Arvore[ProximaArvore][1] = CreateDynamicObject(19056, X-1.39, Y+0.10, Z-0.2, 0.00, 0.00, 0.00);
Arvore[ProximaArvore][2] = CreateDynamicObject(19057, X+1.39, Y+0.45, Z-0.2, 0.00, 0.00, 0.00);
Arvore[ProximaArvore][3] = CreateDynamicObject(19054, X-0.07, Y-0.67, Z-0.2, 0.00, 0.00, 0.00);
ProximaArvore++;
return (ProximaArvore-1);
}
public DeletarArvore(arvoreid)
{
DestroyDynamicObject(Arvore[arvoreid][0]);
DestroyDynamicObject(Arvore[arvoreid][1]);
DestroyDynamicObject(Arvore[arvoreid][2]);
DestroyDynamicObject(Arvore[arvoreid][3]);
format(arquivo,128,PASTA_ARVORES,arvoreid);
dini_Remove(arquivo);
ProximaArvore--;
return 1;
}
public CarregarArvores()
{
new string[128];
new counter;
for(new i=0;i<=MAX_ARVORES;i++){
format(string,sizeof(string),PASTA_ARVORES,i);
if(dini_Exists(string)){
CriarArvore(dini_Float(string,"posX"),dini_Float(string,"posY"),dini_Float(string,"posZ"));
counter++;
}
}
format(string,sizeof(string),"%d бrvores de natal carregadas!!",counter);
if(counter>0) print(string);
return 1;
}
stock MostrarIds()
{
new str[50];
for(new i=0;i<=MAX_ARVORES;i++){
format(arquivo,128,PASTA_ARVORES,i);
if(dini_Exists(arquivo)){
format(str,50,"Arvore id: %d",i);
Id[i] = Create3DTextLabel(str,0xFFFF80AA,dini_Float(arquivo,"posX"),dini_Float(arquivo,"posY"),dini_Float(arquivo,"posZ"),20.0,0);
}
}
return 1;
}
stock OcultarIds()
{
for(new i=0;i<=MAX_ARVORES;i++){
Delete3DTextLabel(Id[i]);
}
return 1;
}
forward Mensagem();
public Mensagem(){
SendClientMessageToAll(0xFF8000AA,"Nossa Equipe Deseja a todos um Feliz Natal!! Use /chapeu");
return 1;
}
public OnPlayerCommandReceived(playerid, cmdtext[])
{
cmd = #;
strcat(cmd, cmdtext);
return 1;
}