SA-MP Forums Archive
[Ajuda] Conseguir ativa o /sirene ,agora queria o cmd /retirar sirene ! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Conseguir ativa o /sirene ,agora queria o cmd /retirar sirene ! (/showthread.php?tid=363927)



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;
}