[Ajuda] Comando /removersirene
#1

Olб, boa tarde, estou com um problema no qual eu consigo criar uma sirene e coloca-la em um carro mas nгo consigo remover a mesma, tentei da seguinte forma criar o comando:

Este funciona perfeitamente:
pawn Код:
COMMAND:sirene(playerid, params[])
{
new objectid = CreateObject(19419, 0, 0, 0, 0, 0, 0);
AttachObjectToVehicle(objectid, GetPlayerVehicleID(playerid), 0.009999, -0.019999, 0.944999, 0.000000, 0.000000, 0.000000);
SendClientMessage(playerid, AMARELO, "Sirene Adicionada");
return 1;
}
pawn Код:
COMMAND:removersirene(playerid, params[])
{
DestroyObject(19419);
SendClientMessage(playerid, AMARELO, "Sirene Removida");
return 1;
}
Poderiam me ajudar?
Reply
#2

Alguйm?
Reply
#3

pawn Код:
DestroyObject(objectid);
Reply
#4

Quote:
Originally Posted by Ouro
Посмотреть сообщение
pawn Код:
DestroyObject(objectid);
Obrigado, mas as definiзхes sempre dгo erro.
Reply
#5

pawn Код:
new sireneObjeto;

COMMAND:sirene(playerid, params[])
{
    sireneObjeto = CreateObject(19419, 0, 0, 0, 0, 0, 0);
    AttachObjectToVehicle(sireneObjeto, GetPlayerVehicleID(playerid), 0.009999, -0.019999, 0.944999, 0.000000, 0.000000, 0.000000);
    SendClientMessage(playerid, AMARELO, "Sirene Adicionada");
    return 1;
}

COMMAND:removersirene(playerid, params[])
{
    DestroyObject(sireneObjeto);
    SendClientMessage(playerid, AMARELO, "Sirene Removida");
    return 1;
}
Reply
#6

Quote:
Originally Posted by Pedro_Miranda
Посмотреть сообщение
pawn Код:
new sireneObjeto;

COMMAND:sirene(playerid, params[])
{
    sireneObjeto = CreateObject(19419, 0, 0, 0, 0, 0, 0);
    AttachObjectToVehicle(objectid, GetPlayerVehicleID(playerid), 0.009999, -0.019999, 0.944999, 0.000000, 0.000000, 0.000000);
    SendClientMessage(playerid, AMARELO, "Sirene Adicionada");
    return 1;
}

COMMAND:removersirene(playerid, params[])
{
    DestroyObject(sireneObjeto);
    SendClientMessage(playerid, AMARELO, "Sirene Removida");
    return 1;
}
objectid ?

Arrumado:
pawn Код:
new sireneObjeto;

COMMAND:sirene(playerid)
{
    sireneObjeto = CreateObject(19419, 0, 0, 0, 0, 0, 0);
    AttachObjectToVehicle(sireneObjeto, GetPlayerVehicleID(playerid), 0.009999, -0.019999, 0.944999, 0.000000, 0.000000, 0.000000);
    SendClientMessage(playerid, AMARELO, "Sirene Adicionada");
    return 1;
}

COMMAND:removersirene(playerid)
{
    DestroyObject(sireneObjeto);
    SendClientMessage(playerid, AMARELO, "Sirene Removida");
    return 1;
}
Reply
#7

Verdade, corrigido.
Reply
#8


@resolvido.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)