DestroyObject help [REP ++]
#1

Hi i need help with DestroyObject when i type /istovaridrva that waiting 1 minute with my timer and when past 1 minute The Car has respawned and show me eror ? Please help me

pawn Код:
if(strcmp(cmd, "/istovarajdrva", true) == 0)
    {
    if(Drvataseistovaraat[playerid] == 1)
    {
    SendClientMessage(playerid, COLOR_WHITE, "{FF4040}GRESKA:{FFFFFF}Drvata veke se istovaraat");
    }
    if(IsPlayerConnected(playerid))
    {
    if(IsPlayerInVehicle(playerid, drvaravozilo1,drvaravozilo2,drvaravozilo3,drvaravozilo4,drvaravozilo5,drvaravozilo6))
    {
    SetTimer("Istovaranje",60000,0);
    Drvataseistovaraat[playerid] = 1;
    SendClientMessage(playerid, COLOR_WHITE, "{37F906}INFO:{FFFFFF}Drvata se istovaraat");
    SendClientMessage(playerid, COLOR_WHITE, "{37F906}INFO:{FFFFFF}Pocekajte 1 minuta dodeka se istovarat drvata");
    return 1;
    }
    }
    }
pawn Код:
public Istovaranje(playerid)
{
    new drvo1 = CreateObject(18609,0,0,-1000,0,0,0,100);
    new drvo2 = CreateObject(18609,0,0,-1000,0,0,0,100);
    new drvo3 = CreateObject(18609,0,0,-1000,0,0,0,100);
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X,Y,Z);
    DestroyObject(drvo1)
    DestroyObject(drvo2)
    DestroyObject(drvo3)
    CreateObject(drvo1, X+10,Y+10,Z);
    CreateObject(drvo2, X+13,Y+13,Z);
    CreateObject(drvo3, X+15,Y+15,Z);
    IstovareniDrva[playerid] = 1;
}
REP ++ !!
Reply
#2

DestroyObject(drvo1)
DestroyObject(drvo2)
DestroyObject(drvo3)


Use:

PHP код:
DestroyObject(drvo1);
DestroyObject(drvo2);
DestroyObject(drvo3); 
Reply
#3

Not working again
Reply
#4

BUMP!
Reply
#5

to try move "CreateObjects"'s in OnGameModeInit ?
Reply
#6

May I ask, what error you get?
Reply
#7

pawn Код:
public Istovaranje(playerid)
{
    new drvo1 = CreateObject(18609,0,0,-1000,0,0,0,100);
    new drvo2 = CreateObject(18609,0,0,-1000,0,0,0,100);
    new drvo3 = CreateObject(18609,0,0,-1000,0,0,0,100);
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X,Y,Z);
    DestroyObject(drvo1)
    DestroyObject(drvo2)
    DestroyObject(drvo3)
    IstovareniDrva[playerid] = 1;
}
?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)