Is this possible? - 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: Is this possible? (
/showthread.php?tid=303147)
Is this possible? -
Twinki1993 - 11.12.2011
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?
Re: Is this possible? -
Trucido - 11.12.2011
I don't get it... Is the object naturally in game or made by scripting..?
pawn Код:
CreateObject
DestroyObject
Re: Is this possible? -
Twinki1993 - 11.12.2011
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.
Re: Is this possible? -
Twinki1993 - 11.12.2011
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.
Re: Is this possible? -
Trucido - 11.12.2011
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.
Re: Is this possible? -
Twinki1993 - 11.12.2011
yeah... but how to deffine it
Re: Is this possible? -
MP2 - 11.12.2011
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
}
Re: Is this possible? -
Twinki1993 - 11.12.2011
Nope not working.
17019 <- Maximum number tho, changed from 20000 to 17019 but still not working.
Re: Is this possible? -
MP2 - 11.12.2011
Show the full code, and where you're using it (where the player is standing).
Re: Is this possible? -
Twinki1993 - 11.12.2011
Quote:
new Float layerpos[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..