Attach Object
#1

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

Yesit is.
Reply
#3

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

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

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

Код:
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.
Reply
#7

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

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

no not working getting undefined symbol error :
Reply
#10

Hello : anyone There can i get helped
please
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)