Destroy object function
#1

I made a neon script

Quote:

new neonuc = CreateObject(18646,0,0,0,0,0,0,100.0);
new neonuc1 = CreateObject(18646,0,0,0,0,0,0,100.0);
AttachObjectToVehicle(neonuc, GetPlayerVehicleID(playerid), -0.5, -0.2, 0.8, 2.0, 2.0, 3.0);
AttachObjectToVehicle(neonuc1, GetPlayerVehicleID(playerid), -0.5, -0.2, 0.8, 2.0, 2.0, 3.0);

How can i delete this object so it only deletes it for the car in which player typed that command
I tried DestroyObject(neon1[playerid]); but doesnt work any ideas??
Reply
#2

I cant get it i searched alot couldnt find it pleas ehelp[
Reply
#3

Did you try
pawn Код:
DestroyObject(neon1);
. I dont think needs [playerid]; its a vehicle attach
Reply
#4

pawn Код:
// Creating the objects
SetPVarInt(playerid, "neonuc1", CreateObject(18646,0,0,0,0,0,0,100.0));
SetPVarInt(playerid, "neonuc2", CreateObject(18646,0,0,0,0,0,0,100.0));
AttachObjectToVehicle(GetPVarInt(playerid, "neonuc1"), GetPlayerVehicleID(playerid), -0.5, -0.2, 0.8, 2.0, 2.0, 3.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neonuc2") GetPlayerVehicleID(playerid), -0.5, -0.2, 0.8, 2.0, 2.0, 3.0);
pawn Код:
DestroyObject(GetPVarInt(playerid, "neonuc1")), DestroyObject(GetPVarInt(playerid, "neonuc2")); // Destroying the objects
Reply
#5

that script doesnt work on my server neon doesnt show up
Reply
#6

any other idea?
Reply
#7

Quote:
Originally Posted by [03]Garsino
Посмотреть сообщение
pawn Код:
// Creating the objects
SetPVarInt(playerid, "neonuc1", CreateObject(18646,0,0,0,0,0,0,100.0));
SetPVarInt(playerid, "neonuc2", CreateObject(18646,0,0,0,0,0,0,100.0));
AttachObjectToVehicle(GetPVarInt(playerid, "neonuc1"), GetPlayerVehicleID(playerid), -0.5, -0.2, 0.8, 2.0, 2.0, 3.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neonuc2") GetPlayerVehicleID(playerid), -0.5, -0.2, 0.8, 2.0, 2.0, 3.0);
pawn Код:
DestroyObject(GetPVarInt(playerid, "neonuc1")), DestroyObject(GetPVarInt(playerid, "neonuc2")); // Destroying the objects
I have a question about this script. Why do you use PVar? EVER
Reply
#8

bump! any help
Reply
#9

Quote:
Originally Posted by Anthony_prince
Посмотреть сообщение
I have a question about this script. Why do you use PVar? EVER
Why not use PVars? They're easy to use.

Also, Swiftz: You probally got the wrong co-ordinates then.
Reply
#10

I dont know they just dont work i've tried alot they dont work, I put the same co-ordinates the other way they work any other idea?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)