[Ajuda] ajuda c/ AttachObjectToVehicle
#1

oi pessoal, bom eu to fuзando num cуdigo de atachar objetos, que peguei originalmente num post do Kuddy (https://sampforum.blast.hk/showthread.php?tid=266933), mexi do jeito que eu preciso e por enquanto tб assim:

Code:
if (strcmp("/sirene", cmdtext, true, 10) == 0)
    {
        SetPVarInt(playerid, "Status", 1);
        SetPVarInt(playerid, "parte1", CreateObject(18646,0,0,0,0,0,0));
        SetPVarInt(playerid, "parte2", CreateObject(18646,0,0,0,0,0,0));
        SetPVarInt(playerid, "parte3", CreateObject(18646,0,0,0,0,0,0));
        SetPVarInt(playerid, "parte4", CreateObject(18646,0,0,0,0,0,0));
        AttachObjectToVehicle(GetPVarInt(playerid, "parte1"), GetPlayerVehicleID(playerid), -0.9016,2.8629,0.7628,0.00000000,0.00000000,0.00000000);
        AttachObjectToVehicle(GetPVarInt(playerid, "parte2"), GetPlayerVehicleID(playerid), 0.8984,2.8629,0.7628,0.00000000,0.00000000,0.00000000);
        AttachObjectToVehicle(GetPVarInt(playerid, "parte3"), GetPlayerVehicleID(playerid), 1.0244,-2.8671,1.0868,0.00000000,0.00000000,0.00000000);
        AttachObjectToVehicle(GetPVarInt(playerid, "parte4"), GetPlayerVehicleID(playerid), -1.0276,-2.8671,1.0868,0.00000000,0.00000000,0.00000000);

		SendClientMessage(playerid, 0xFFFFFFAA, "Objetos criados com sucesso!!!");
        //DestroyObject(18646);

        return 1;
    }
esse code cria essas 4 sirenes, que ficam fixas atй qdo o carro й respawnado, atй aн blz....


(antes de eu levar bronca, jб vasculhei o wiki e o forum e mas todos tutos que achei nгo consegui o que eu quero!!!)

minha dъvida й, qual o nome da funзгo pra manter essa sirenes no veнculo mesmo quando o servidor for desligado?
vlw galera abraзos
Reply
#2

Entгo, vocк precisa utilizar algum sistema de salvamento, para salvar e carregar as informaзхes necessбrias.

Tem includes de salvamento muito boas, como MySQL, DOF2, e outras aqui na board, com os seus respectivos tutoriais.
Reply
#3

opa, brigadгo arakuta, jб achei tuto disso aqui vlw msm!!! maravilha!!
porra jб tava horas fritando o wiki achando que era sу por um comando e mais nada heheeh
vlw mwm!!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)