[Ajuda] Conseguir ativa o /sirene ,agora queria o cmd /retirar sirene !
#1

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
Reply
#2

Vo ver Aki
Reply
#3

tenta usar o DestroyObject
Reply
#4

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 "*"
Reply
#5

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 ...
Reply
#6

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? :/
Reply
#7

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
Reply
#8

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
Reply
#9

Quote:
Originally Posted by Ades
Посмотреть сообщение
So faltou identaзгo -q



Sim

Gostei de vc =D
І xD'
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)