Conseguir ativa o /sirene ,agora queria o cmd /retirar sirene ! -
Carlos_barbosa - 29.07.2012
if(strcmp(cmd, "/sirene", true) == 0)
{
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, COLOR_YELLOW, "sirene adicionada");
return 1;
},deu certo de ativa agora queria o de remover que ficaria assim ?
if(strcmp(cmd, "/sirene", true) == 0)
{
new objectid = CreateObject(19419, 0, 0, 0, 0, 0, 0);
removeAttachObjectToVehicle(objectid, GetPlayerVehicleID(playerid), 0.009999, -0.019999, 0.944999, 0.000000, 0.000000, 0.000000);
SendClientMessage(playerid, COLOR_YELLOW, "sirene adicionada");
return 1;
}
ajuda ai,so novatгo
Re: Conseguir ativa o /sirene ,agora queria o cmd /retirar sirene ! -
Coreia - 29.07.2012
Vo ver Aki
Re: Conseguir ativa o /sirene ,agora queria o cmd /retirar sirene ! -
Coreia - 29.07.2012
tenta usar o DestroyObject
Re: Conseguir ativa o /sirene ,agora queria o cmd /retirar sirene ! -
victor304 - 29.07.2012
Concerteza й isso sim carlos
mais vou ver, ve se desse geito funciona:
pawn Код:
if(strcmp(cmd, "/retirarsirene", true) == 0)
{
new objectid = CreateObject(19419, 0, 0, 0, 0, 0, 0);
RemoveAttachObjectToVehicle(GetPlayerVehicleID(playerid), objectid);
SendClientMessage(playerid, COLOR_YELLOW, "");
return 1;
}
OBS: Nгo testei :P
se nгo funcionar avisa manin
e usa [pawn] [*/pawn] qnd for postar pawn codes, para ficar mais facil de entender
OBS: sem a "*"
Re: Conseguir ativa o /sirene ,agora queria o cmd /retirar sirene ! -
Ades - 29.07.2012
Quote:
Originally Posted by victor304
Concerteza й isso sim carlos
mais vou ver, ve se desse geito funciona:
pawn Код:
if(strcmp(cmd, "/retirarsirene", true) == 0) { new objectid = CreateObject(19419, 0, 0, 0, 0, 0, 0); RemoveAttachObjectToVehicle(GetPlayerVehicleID(playerid), objectid); SendClientMessage(playerid, COLOR_YELLOW, ""); return 1; }
OBS: Nгo testei :P
se nгo funcionar avisa manin
e usa [pawn] [*/pawn] qnd for postar pawn codes, para ficar mais facil de entender
OBS: sem a "*" 
|
Codigo estб errado .
CreateObject ?
Seria outra funзгo nгo ?
Poderia ter utilizado uma variбvel bool para verificar se estб com sirene ou nгo ...
Re: Conseguir ativa o /sirene ,agora queria o cmd /retirar sirene ! -
victor304 - 29.07.2012
Quote:
Originally Posted by Ades
Codigo estб errado .
CreateObject ?
Seria outra funзгo nгo ?
Poderia ter utilizado uma variбvel bool para verificar se estб com sirene ou nгo ...
|
ah.. ;P
й que sou iniciante ainda, mais mesmo sendo iniciante, gosto de ajudar os outros e ser ajudado...
Claro que as vezes iremos errar ne? :/
Re: Conseguir ativa o /sirene ,agora queria o cmd /retirar sirene ! -
Ades - 29.07.2012
Quote:
Originally Posted by .FuneraL.
pawn Код:
if(strcmp(cmd, "/sirene", true) == 0) { 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, COLOR_YELLOW, "sirene adicionada"); } else { RemoveAttachObjectToVehicle(objectid, GetPlayerVehicleID(playerid), 0.009999, -0.019999, 0.944999, 0.000000, 0.000000, 0.000000); SendClientMessage(playerid, COLOR_YELLOW, "sirene retirada"); return 1; }

|
So faltou identaзгo -q
Quote:
Originally Posted by victor304
ah.. ;P
й que sou iniciante ainda, mais mesmo sendo iniciante, gosto de ajudar os outros e ser ajudado...
Claro que as vezes iremos errar ne? :/
|
Sim
Gostei de vc =D
Re: Conseguir ativa o /sirene ,agora queria o cmd /retirar sirene ! -
.FuneraL. - 29.07.2012
Quote:
Originally Posted by Ades
So faltou identaзгo -q
Sim
Gostei de vc =D
|
Identaзгo diretamente no fуrum samp nгo й meu ponto forte -q, mas tudo bem
Re: Conseguir ativa o /sirene ,agora queria o cmd /retirar sirene ! -
victor304 - 29.07.2012
Quote:
Originally Posted by Ades
So faltou identaзгo -q
Sim
Gostei de vc =D
|
І xD'
Re: Conseguir ativa o /sirene ,agora queria o cmd /retirar sirene ! -
victor304 - 29.07.2012
Quote:
Originally Posted by Ades
So faltou identaзгo -q
Sim
Gostei de vc =D
|
Aki estб o codigo com identaзгo -q
pawn Код:
if (strcmp(cmd, "/sirene", true) == 0)
{
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, COLOR_YELLOW, "sirene adicionada");
}
else
{
RemoveAttachObjectToVehicle(objectid, GetPlayerVehicleID(playerid), 0.009999, -0.019999, 0.944999, 0.000000, 0.000000, 0.000000);
SendClientMessage(playerid, COLOR_YELLOW, "sirene retirada");
return 1;
}