Is There Any Chance
#1

Is There Any Chance To Use RemoveDynamicObject
Reply
#2

Yes, but the function would be DestroyDynamicObject.
Reply
#3

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

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.

Reply
#5

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

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

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

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

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
Reply
#9

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);
Reply
#10

But when i was using cmds it should distroyed
Reply
#11

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

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
Reply
#13

in removebuildingforplayer we can remove objects which we maked on mta
Reply
#14

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

but i want to remove which i made in mta
Reply
#16

Then remove your createobject lines which you created.
Reply
#17

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

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

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.
__________________
Reply
#20

I already posted the solution, use it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)