Is this possible?
#1

Hello guys, well I Am trying to make command like /removeobject, that will remove object that is infront of the player. Is this possible, and how to do it?
Reply
#2

I don't get it... Is the object naturally in game or made by scripting..?
pawn Код:
CreateObject
DestroyObject
Reply
#3

Well for now on I came to
Quote:

new Float, Float:y, Float:z;
RemoveBuildingForPlayer(playerid, modelid, x,y,z, 1);
return 1;

But I dont have the ID that goes infront of the player.
Reply
#4

Well I am saying about natural objects, like the buildings from original San Andreas. Not the mapping objects. Like we have RemoveBuildingForPlayer <- I am talking about this.
Reply
#5

Quote:
Originally Posted by Twinki1993
Посмотреть сообщение
Well I am saying about natural objects, like the buildings from original San Andreas. Not the mapping objects. Like we have RemoveBuildingForPlayer <- I am talking about this.
I don't think its possible, I tried
pawn Код:
new Float:x,Float:y,Float:z;
          RemoveBuildingForPlayer(playerid, modelid, x,y+10,z, 5.0);
          return 1;
but modelid is undefined. I don't know if I'm right but that's just what I think.
Reply
#6

yeah... but how to deffine it
Reply
#7

pawn Код:
new Float:playerpos[3];
GetPlayerPos(playerid, playerpos[0], playerpos[1], playerpos[2]);

for(new i=0; i<20000; i++) // Not sure what 20000 should be - it needs to be the highest possible object model id
{
    RemoveBuildingForPlayer(playerid, i, playerpos[0], playerpos[1], playerpos[2], 50); // 50 = 50 meters around player
}
Reply
#8

Nope not working.
17019 <- Maximum number tho, changed from 20000 to 17019 but still not working.
Reply
#9

Show the full code, and where you're using it (where the player is standing).
Reply
#10

Quote:

new Floatlayerpos[3];
GetPlayerPos(playerid, playerpos[0], playerpos[1], playerpos[2]);

for(new i=0; i<20000; i++) // Not sure what 20000 should be - it needs to be the highest possible object model id
{
RemoveBuildingForPlayer(playerid, i, playerpos[0], playerpos[1], playerpos[2], 50); // 50 = 50 meters around player
}

This..
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)