[Unsolved]help with object destroy
#1

Hi i have a roadblock system which allows a police officer to spawn 5 roadblocks, i have one problem..
Lets say
Paul spawns 5 roadblocks
Johnny spawns 5 roadblocks.
Then Paul removes his roadblocks, but it removes Johnnys..
And then when johnnys are removed, johnny can't remove anything.. ( It only works for the last 5 created roadblocks)
Now i would like some help to create a command to just destroy them all, since i dont know how to fix the other problem.
This is how my /roadunblockall looks like it doesn't work it still doesn't delete Pauls 5 roadblocks.


Код:
	if(strcmp(cmd, "/roadunblockall", true) == 0 || strcmp(cmd, "/rball", true) == 0)
	{
		if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] != 1)
		{
			SendClientMessage(playerid, COLOR_GREY, "[Error] Invalid faction");
			return 1;
		}
  	DestroyObject(roadblock5);
  	DestroyObject(roadblock4);
  	DestroyObject(roadblock3);
  	DestroyObject(roadblock2);
  	DestroyObject(roadblock1);
  	RoadBlock5[playerid] -= 1;
  	RoadBlock5[playerid] -= 2;
  	RoadBlock5[playerid] -= 3;
  	RoadBlock5[playerid] -= 4;
  	RoadBlock5[playerid] -= 5;
		SendClientMessage(playerid, COLOR_LSPD, "[Info] Roadblocks removed");
		return 1;
	}
My roadblock line
roadblock5 = CreateObject(950, rbX, rbY, rbZ, 0.0, 0.0, rbA+180);
Remember i have five of these lines just the number "5" is also 4 -3 - 2 - 1

Is there any commands to just DELETE all object ID's 950, i beg you its a huge problem
Reply


Messages In This Thread
[Unsolved]help with object destroy - by Perker12345 - 10.01.2010, 16:35
Re: help with object destroy - by Finn - 10.01.2010, 16:54
Re: help with object destroy - by Perker12345 - 10.01.2010, 16:55
Re: [Unsolved]help with object destroy - by Perker12345 - 11.01.2010, 22:20
Re: [Unsolved]help with object destroy - by Perker12345 - 12.01.2010, 21:55
Re: [Unsolved]help with object destroy - by Hijolion - 12.01.2010, 22:34

Forum Jump:


Users browsing this thread: 1 Guest(s)