SA-MP Forums Archive
Is There Any Chance - 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 There Any Chance (/showthread.php?tid=355770)



Is There Any Chance - God'Z War - 01.07.2012

Is There Any Chance To Use RemoveDynamicObject


Re: Is There Any Chance - Finn - 01.07.2012

Yes, but the function would be DestroyDynamicObject.


Re: Is There Any Chance - God'Z War - 01.07.2012

i am using an cmd to remove objects when player types the cmds
when i add some error came
Code:
C:\Users\hp\Desktop\____________________.pawn(121) : error 017: undefined symbol "RemoveDynamicObject"
C:\Users\hp\Desktop\____________________.pawn(122) : error 017: undefined symbol "RemoveDynamicObject"
C:\Users\hp\Desktop\____________________.pawn(123) : error 017: undefined symbol "RemoveDynamicObject"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.



Re: Is There Any Chance - God'Z War - 01.07.2012

I Changed into DistroyDynamicObject
I got too much warning
Quote:

C:\Users\hp\Desktop\.pwn(121) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\.pwn(121) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\.pwn(121) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\.pwn(121) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\.pwn(121) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\.pwn(121) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\.pwn(122) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\.pwn(122) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\.pwn(122) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\.pwn(122) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\.pwn(122) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\.pwn(122) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\.pwn(123) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\.pwn(123) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\.pwn(123) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\.pwn(123) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\.pwn(123) : warning 202: number of arguments does not match definition
C:\Users\hp\Desktop\.pwn(123) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


18 Warnings.




Re: Is There Any Chance - thefatshizms - 01.07.2012

Could you please post some code it will make it more easy for us to help you


Re: Is There Any Chance - Finn - 01.07.2012

"warning 202: number of arguments does not match definition"

Isn't that pretty much obvious what's wrong there?


Re: Is There Any Chance - God'Z War - 01.07.2012

This is The Code
pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/remove"))
     {
        DestroyDynamicObject(6189,836.29998779,-2128.39990234,-2.50000000,0.00000000,0.00000000,0.00000000); //object(gaz_pier1) (1)
        DestroyDynamicObject(6189,836.20001221,-2257.50000000,-2.50000000,0.00000000,0.00000000,0.00000000); //object(gaz_pier1) (2)
        DestroyDynamicObject(6189,836.09997559,-2384.39990234,-2.29999995,0.00000000,0.00000000,0.00000000); //object(gaz_pier1) (3)
       
        return 1;
    }
    return 0;
}



Re: Is There Any Chance - God'Z War - 01.07.2012

Quote:
Originally Posted by Finn
View Post
"warning 202: number of arguments does not match definition"

Isn't that pretty much obvious what's wrong there?
But how i can fix this warn


Re: Is There Any Chance - Mean - 01.07.2012

That's not how it works, you need to assign a variable to an object when creating it:
pawn Code:
new obj;
public OnGameModeInit() {
    obj = CreateObject(...);
    return 1;
}

// and then you can use
DestroyDynamicObject(obj);



Re: Is There Any Chance - God'Z War - 01.07.2012

But when i was using cmds it should distroyed


Re: Is There Any Chance - Mean - 01.07.2012

So what? Assign a variable and destroy it in a command.


Re: Is There Any Chance - Calgon - 01.07.2012

You're probably confusing yourself with RemoveBuildingForPlayer.

RemoveBuildingForPlayer removes objects from the game which you haven't added with CreateObject or CreateDynamicObject.

DestroyDynamicObject and DestroyObject can only be used with lines you've made using CreateObject or CreateDynamicObject. You need to use RemoveBuildingForPlayer otherwise.

https://sampwiki.blast.hk/wiki/RemoveBuildingForPlayer


Re: Is There Any Chance - God'Z War - 01.07.2012

in removebuildingforplayer we can remove objects which we maked on mta


Re: Is There Any Chance - Mean - 01.07.2012

Quote:
Originally Posted by God'Z War
View Post
in removebuildingforplayer we can remove objects which we maked on mta
With RemoveBuildingForPlayer you can remove game's default objects, such as buildings, roads, etc.


Re: Is There Any Chance - God'Z War - 01.07.2012

but i want to remove which i made in mta


Re: Is There Any Chance - Lordzy - 01.07.2012

Then remove your createobject lines which you created.


Re: Is There Any Chance - God'Z War - 01.07.2012

[xB]Lordz Without Understanding My Question Dont Post
i said with cmd i am want to remove the building


Re: Is There Any Chance - pasha97 - 01.07.2012

you must create variables which assigne id's of objects which need to be removed, and then use: DestroyDynamicObject(objectid);


Re: Is There Any Chance - Lordzy - 01.07.2012

Oh im sorry GOD'Z WAR
Well first try this
new object;
//under gamemodeinit
object =CreateDynamicObject(...);
return 1;
} Then use your command.
This might help you.
Please forgive me if something's wrong in this.
Because im using in mobile.
__________________


Re: Is There Any Chance - Mean - 01.07.2012

I already posted the solution, use it.