Object won't destroy
#1

Hello there sa:mp scripters.

I have a problem with one of my scripts. I used CreatePlayerObject and when i chose in dialog to destroy that PlayerObject (DestroyPlayerObject function) it didn't work - the object is at his x,y,z position. So that's why i created this thread hoping that you might help me.
Reply
#2

any suggestions?
Reply
#3

No one can help you out without seeing the way you scripted, mind posting the code
Reply
#4

for example like this - its in onplayerdisconnect - tested in game, object didin't disappear

Код:
for(new i; i<MAX_PLAYERS_EX; i++)
{
DestroyPlayerObject(i,Item[playerid]);
}
//the Item is Item[playerid]=Create... when player choose in dialog
Reply
#5

Show the whole code.
Reply
#6

this one is for destroy
Код:
for(new i; i<MAX_PLAYERS_EX; i++)
{
DestroyPlayerObject(i,Item[playerid]);
}
this one is for create
Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
for(new i; i<MAX_PLAYERS_EX; i++)
{
Item[playerid] = CreatePlayerObject(i,ItemID[playerid],x,y,z-1,0,0,0,0.0);
}
Reply
#7

pawn Код:
for(new i; i<MAX_PLAYERS_EX; i++)
{
Item[i] = CreatePlayerObject(i,ItemID[i],x,y,z-1,0,0,0,0.0);
}
pawn Код:
for(new i; i<MAX_PLAYERS_EX; i++)
{
DestroyPlayerObject(i,Item[i]);
}
Reply
#8

This is bullshit coz it will destroy everyones Item. I just need when the current player destroys it (via dialog), it will change the HaveItem = 0 (done) and other player won't see that Item-Object anymore. At this part when player does it(destroys object) it do not disappear.
Reply
#9

bump, any help?
Reply
#10

bump
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)