[Ajuda] Como converter 3b
#3

Apague as suas includes do gamemode, e de seguida coloque isto:
pawn Код:
//-»»»  Versгo do Servidor «««-//
#define ServerVersion 1 // 0 = 0.3a | 1 = 0.3b | 2 = 0.3c - MUDE

//-»»»  Includes do GameMode «««-//

#if ServerVersion ==  0

#include "../Includes0/a_samp.inc"
#include "../includes0/Comandos.inc"
#include "../includes0/Arquivos.inc"
#include "../includes0/stremming.inc"
#include "../includes0/Foreach.inc"
#include "../includes0/djson.inc"
#include "../includes0/Veiculos.inc"

#endif

#if ServerVersion ==  1

#include "../Includes1/a_mysql.inc"
#include "../Includes1/a_samp.inc"
#include "../Includes1/a_http.inc"
#include "../includes1/Comandos.inc"
#include "../includes1/Arquivos.inc"
#include "../includes1/stremming.inc"
#include "../includes1/Foreach.inc"
#include "../includes1/djson.inc"
#include "../includes1/Veiculos.inc"

#endif

#if ServerVersion ==  2

#include "../Includes2/a_samp.inc"
#include "../includes2/Comandos.inc"
#include "../includes2/Arquivos.inc"
#include "../includes2/stremming.inc"
#include "../includes2/Foreach.inc"
#include "../includes2/djson.inc"
#include "../includes2/Veiculos.inc"
#define SetPlayerHoldingObject(%1,%2,%3,%4,%5,%6,%7,%8,%9) SetPlayerAttachedObject(%1,5-1,%2,%3,%4,%5,%6,%7,%8,%9)
#define StopPlayerHoldingObject(%1) RemovePlayerAttachedObject(%1,5-1)
#define IsPlayerHoldingObject(%1) IsPlayerAttachedObjectSlotUsed(%1,5-1)

#endif
Pastas:
Includes0 = 0.3a
Includes1 = 0.3b
Includes2 = 0.3c


Editando Objetos:
Como na versгo A para versгo B houve uma pequena modificaзгo nos objetos faзa o seguinte:

Mude todos os:
CreateObject (para) CreateObjectEx

E adicione ao final do gamemode:
pawn Код:
stock CreateObjectEx(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance = 333.3)
{
    #if ServerVersion ==  0
        #pragma unused DrawDistance
        CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ);
    #endif

    #if ServerVersion ==  1
        CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance);
    #endif

    #if ServerVersion ==  2
        CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance);
    #endif

    return true;
}
Lembre-se:
Код:
#if ServerVersion ==  1  - > Checarб versгo do server
#endif                         -> Fecharб o cуdigo para a versгo usada na condicional if
#pragma unused DrawDistance  -> Indica que nгoo usaremos DrawDistance (evita warns)
Crйditos: DraKiNs
Reply


Messages In This Thread
[Ajuda] Como converter 3b - by williamgato - 29.04.2011, 23:20
Re: Como converter 3b - by Shadoww5 - 29.04.2011, 23:34
Re: [Ajuda] Como converter 3b - by The Knight - 29.04.2011, 23:45
Re: [Ajuda] Como converter 3b - by williamgato - 30.04.2011, 00:02
Re: Como converter 3b - by williamgato - 30.04.2011, 00:04
Re: [Ajuda] Como converter 3b - by Shadoww5 - 30.04.2011, 00:06
Respuesta: [Ajuda] Como converter 3b - by henrique_wwi - 30.04.2011, 00:10
Re: [Ajuda] Como converter 3b - by The Knight - 30.04.2011, 00:14
Re: [Ajuda] Como converter 3b - by williamgato - 30.04.2011, 00:19
Re: [Ajuda] Como converter 3b - by The Knight - 30.04.2011, 00:24

Forum Jump:


Users browsing this thread: 1 Guest(s)