SA-MP Forums Archive
Attach Object - 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)
+--- Thread: Attach Object (/showthread.php?tid=348373)



Attach Object - Saleem - 05.06.2012

yep!
I need a Car's Objects Removing command

I think its here

Код:
DestroyObject(objectid);
But i am not sure it will remove car object or Player Object ? which call i need ?


Re: Attach Object - Firo - 05.06.2012

Yesit is.


Re: Attach Object - Saleem - 05.06.2012

its not working On Me : can you give me a command for removing Vehicle objects


Re: Attach Object - Sandiel - 05.06.2012

If it's not working, try to edit the object's pos to anywhere, like under water or somewhere where no one would go to.

But DestroyObject should work, if it doesn't, there's your solution.


Re: Attach Object - CyNiC - 05.06.2012

You need to store the object id for destroy later.
Fast example.
pawn Код:
//Top:
new VehicleInfo[MAX_VEHICLES][5];
//Attaching:
VehicleInfo[vehicleid][0] = CreateObject(blabla..);
AttachObjectToVehic...
//Detaching:
DestroyObject(VehicleInfo[vehicleid][0]);
You can use the slots 0, 1, 2, 3 and 4 for hold the attached objects id, if more is needed, change the value of 5 for your amount.


Re: Attach Object - Saleem - 05.06.2012

Код:
E:\Samp Servers\My Uploadu Server 0.3E\gamemodes\Twin.pwn(5579) : error 017: undefined symbol "vehicleid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: Attach Object - Saleem - 06.06.2012

help : please
give me full command
Код:
if (strcmp("/vremove", cmdtext, true, 10) == 0) {
    DestroyObject(VehicleInfo[vehicleid][0]);
	SendClientMessage(playerid, 0xE60000FF, "the object have been successfully removed");
	return 1; }



Re: Attach Object - mati233 - 06.06.2012

That command is supposed the remove the car that you're in?
In that case add before that
new vehicleid=GetPlayerVehicleId(playerid);


Re: Attach Object - Saleem - 06.06.2012

no not working getting undefined symbol error :


Re: Attach Object - Saleem - 06.06.2012

Hello : anyone There can i get helped
please