SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 06/02/2011, 03:00 PM   #1
Ricop522
High-roller
 
Ricop522's Avatar
 
Join Date: Feb 2010
Location: ES
Posts: 2,697
Reputation: 148
Default Dini lagando

Dini está lagando o meu server!!
Alguém me da uma ajuda ?
__________________
"Any fool can write code that a
computer can understand. Good
programmers write code that
humans can understand."

Sistemas de Informação, IFES
Ricop522 is offline   Reply With Quote
Old 06/02/2011, 03:02 PM   #2
Macintosh
High-roller
 
Macintosh's Avatar
 
Join Date: Aug 2010
Location: Somewhere Far User Type: Administrator
Posts: 3,630
Reputation: 111
Default Re: Dini lagando

Muda pra Fini... do DraKINs
__________________

"É tão estranho
Os bons morrem jovens
Assim parece ser, quando me lembro de você
Que acabou indo embora, cedo demais
"

Os bons morrem jovens (Legião Urbana).

Um dia a gente irá se encontrar numa bem melhor brother

Macintosh is offline   Reply With Quote
Old 06/02/2011, 03:10 PM   #3
Ricop522
High-roller
 
Ricop522's Avatar
 
Join Date: Feb 2010
Location: ES
Posts: 2,697
Reputation: 148
Default Re: Dini lagando

Pra mudar é só substituir ex:

dini_Set

Fini_Set

Dini_IntSet
Fini_SetStr

dini_FloatSet
Fini_FloatSet

?
__________________
"Any fool can write code that a
computer can understand. Good
programmers write code that
humans can understand."

Sistemas de Informação, IFES
Ricop522 is offline   Reply With Quote
Old 06/02/2011, 03:30 PM   #4
Ricop522
High-roller
 
Ricop522's Avatar
 
Join Date: Feb 2010
Location: ES
Posts: 2,697
Reputation: 148
Default Re: Dini lagando

up.--
__________________
"Any fool can write code that a
computer can understand. Good
programmers write code that
humans can understand."

Sistemas de Informação, IFES
Ricop522 is offline   Reply With Quote
Old 06/02/2011, 03:39 PM   #5
Baddark2131
Banned
 
Join Date: Apr 2010
Posts: 404
Reputation: 0
Default Re: Dini lagando

pawn Code:
//==============================================================================
//Includes
#include a_samp

//==============================================================================
//Configs
#define MAX_PLATES (999)
#define PLACA_FILE "PlacasVeiculos.fek"
#define maxtag   (00244)
#define maxfile    (99999)
#define maxname (00064)

//==============================================================================
//Files
public OnFilterScriptInit()
{
    Fini_OpenFile(PLACA_FILE);
    for(new i; i < MAX_PLATES; ++i)
        LoadVehicleNumberPlateEx(i);
    Fini_SaveFile();
    Fini_CloseFile();
}

public OnFilterScriptExit()
{
    Fini_OpenFile(PLACA_FILE);
    for(new i; i < MAX_PLATES; ++i)
        SaveVehicleNumberPlateEx(i);
    Fini_SaveFile();
    Fini_CloseFile();
}

//==============================================================================
//Functions Plates
new Plaquinhas[MAX_PLATES][64];

stock
    SetVehicleNumberPlateEx(vehid,plate[])
{
    format(Plaquinhas[vehid],64,"%s",plate);
    SetVehicleNumberPlate(vehid,plate);
    return SetVehicleToRespawn(vehid);
}

stock
    RemoveVehicleNumberPlate(vehid)
{
    Plaquinhas[vehid][0] = '\0';
    SetVehicleNumberPlate(vehid," ");
    return SetVehicleToRespawn(vehid);
}

#define GetVehicleNumberPlateEx(%0) Plaquinhas[%0]


//==============================================================================
//File Functions Plates

stock
    SaveVehicleNumberPlateEx(vehid)
{
    new aString[8],iString[64];
    format(aString,8,"%d",vehid),format(iString,64,"%s",GetVehicleNumberPlateEx(vehid));
    return Fini_SetStr(aString,iString);
}

stock
    LoadVehicleNumberPlateEx(vehid)
{
    new aString[64];
    format(aString,64,"%d",vehid);
    return SetVehicleNumberPlateEx(vehid,Fini_GetStr(aString));
}

//==============================================================================
//Fini [2.0]
#define Fini_Exists             fexist
#define Fini_GetFloat(%0)       floatstr(Fini_GetStr(%0))

static
    zNormal1,
    zNormal2,
    fStr[maxtag],
    fTag[maxtag],
    fFile[maxfile],
    File:zFopenFile,
    fName[maxname],
    iSource
;

stock
    Fini_OpenFile(fname[])
{
    zFopenFile = fopen(fname,io_read);

    while(fread(zFopenFile,fStr))
        strins(fFile,fStr,strlen(fFile),maxfile);

    fclose(zFopenFile);
    format(fName,maxname,"%s",fname);
    return true;
}

stock
    Fini_SaveFile()
{
    fremove(fName);
    zFopenFile = fopen(fName,io_write);

    fwrite(zFopenFile,fFile);
    fclose(zFopenFile);
    return true;
}

stock
    Fini_CloseFile()
{
    fFile[0] = '\0';
    fName[0] = '\0';
    return true;
}

stock
    Fini_GetStr(ftag[])
{
    zNormal1 = strfind(fFile,ftag,true);
    zNormal2 = (zNormal1 + (strlen(ftag)));
    strmid(fTag,fFile,zNormal2,(zNormal2  + maxtag),maxtag);
    zNormal2 = strfind(fTag,"\n",true);
    strmid(fStr,fTag,1,zNormal2 ,maxtag);
    return fStr;
}


stock
    Fini_SetStr(ftag[],fstr[])
{
    format(fTag,maxtag,"%s=%s",ftag,Fini_GetStr(ftag));
    zNormal1 = strfind(fFile,ftag,true);
    if(zNormal1 != -1)
    {
        iSource = strlen( fTag ) ;
        format(fStr,maxtag,"%s=%s",ftag,fstr);
        strdel(fFile,zNormal1  ,(zNormal1 + iSource));
        format(fStr,128,"%s",fStr);
        strins(fFile,fStr,zNormal1 ,128);
    }

    else
    {
        format(fStr,maxtag,"%s=%s\r\n",ftag,fstr);
        strins(fFile,fStr,strlen(fFile));
    }
    return true;
}

stock
    Fini_Create(nFile[])
{
    if (Fini_Exists(nFile)) return false;
    new File:cFile = fopen(nFile,io_write);
    return fclose(cFile);
}

stock
    Fini_SetVal(ftag[],fval)
{
    static Seting[24];
    format(Seting,maxtag,"%d",fval);
    Fini_SetStr(ftag,Seting);
    return true;
}

stock
    Fini_SetFloat(ftag[],Float:fval)
{
    static Seting[24];
    format(Seting,maxtag,"%f",fval);
    Fini_SetStr(ftag,Seting);
    return true;
}

stock
    Fini_SetBool(ftag[],bool:fval)
{
    static Seting[24];
    format(Seting,maxtag,"%d",fval);
    Fini_SetStr(ftag,Seting);
    return true;
}

stock
    Fini_IsSet(ftag[])
{
    format(fTag,maxtag,"%s=%s",ftag,Fini_GetStr(ftag));
    zNormal1 = strfind(fFile,ftag,true);
    if(zNormal1 != -1)
        return true;
    return false;
}

stock Fini_GetBool(ftag[])
{
    new Seting = strval(Fini_GetStr(ftag));
    return Seting;
}

stock Fini_GetValue(ftag[])
{
    new Seting = strval(Fini_GetStr(ftag));
    return Seting;
}

Creditos a [iPs]DraKiNs

Caso queira verificar no que foi usado visite este Topico !
http://forum.sa-mp.com/showthread.php?t=214535
Baddark2131 is offline   Reply With Quote
Old 06/02/2011, 03:58 PM   #6
RodiauOUI
Big Clucker
 
RodiauOUI's Avatar
 
Join Date: Sep 2010
Location: Atrás de ocê
Posts: 78
Reputation: 0
Default Re: Dini lagando

usa Y_ini ou SII
aq fini laga tb
__________________
GameModes:
Nem um no momento
FilterScript
Nem um no momento
Tutoriais
Poner objetos en el MTA
This command does not exist


RodiauOUI is offline   Reply With Quote
Old 06/02/2011, 04:23 PM   #7
Macintosh
High-roller
 
Macintosh's Avatar
 
Join Date: Aug 2010
Location: Somewhere Far User Type: Administrator
Posts: 3,630
Reputation: 111
Default Re: Dini lagando

Fini foi feito na base do Dini se não engano ~.~'
__________________

"É tão estranho
Os bons morrem jovens
Assim parece ser, quando me lembro de você
Que acabou indo embora, cedo demais
"

Os bons morrem jovens (Legião Urbana).

Um dia a gente irá se encontrar numa bem melhor brother

Macintosh is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can someone help me with Dini caribe88 Help Archive 2 20/02/2010 08:09 PM
[Help]Dini, again Dirty_bum Help Archive 3 18/11/2009 01:07 PM
Help me please(Dini) user226 Help Archive 7 08/08/2009 07:21 AM


All times are GMT. The time now is 02:08 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.