Destroy object function - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Destroy object function (
/showthread.php?tid=215894)
Destroy object function -
Swiftz - 24.01.2011
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??
Re: Destroy object function -
Swiftz - 24.01.2011
I cant get it i searched alot couldnt find it pleas ehelp[
Re: Destroy object function -
TheArcher - 24.01.2011
Did you try
. I dont think needs [playerid]; its a vehicle attach
Re: Destroy object function - [03]Garsino - 24.01.2011
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
Re: Destroy object function -
Swiftz - 24.01.2011
that script doesnt work on my server neon doesnt show up
Re: Destroy object function -
Swiftz - 24.01.2011
any other idea?
Re: Destroy object function -
TheArcher - 24.01.2011
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
Re: Destroy object function -
Swiftz - 27.01.2011
bump! any help
Re: Destroy object function - [03]Garsino - 27.01.2011
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.
Re: Destroy object function -
Swiftz - 27.01.2011
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?