Destroy Object Help
#1

Im scripting a robbing system at this moment. So when i enter the bank and write a cmd, the server creates an explosion near the safe door and that door should disappear, but it does not.

Код:
forward TimerBanca5(playerid);
Quote:

if (rand == 1) { SetTimerEx("TimerBanca5",16000,false,"i",playerid) ; CP[playerid] = 453; }

Код:
if(strcmp(cmd, "/bankrobbery", true) == 0)
{  PlayerInfo[playerid][pvorota] = CreateObject(2634, 2144.1999511719, 1626.9000244141, 994.29998779297, 0, 0, 180.8212890625);  }
Quote:

public TimerBanca5(playerid)
{
DestroyObject(PlayerInfo[playerid][pvorota]);
PlayerInfo[playerid][pvorota] = 0;
PlayerInfo[playerid][pvorota] = CreateObject(2634, 2145.3999023438, 1625.9000244141, 994.29998779297, 0, 0, 270);
}

Pls help. thank you
Reply
#2

Try this, compile without error, didn't test it ingame!

pawn Код:
forward TimerBanca5(playerid);
public TimerBanca5(playerid)
{
    CreateObject(2634, 2145.3999023438, 1625.9000244141, 994.29998779297, 0, 0, 270);
    DestroyObject(2634);
    return 1;
}
//---------------------------------------------------------------------------------//
if(strcmp(cmd, "/bankrobbery", true) == 0)
{  
    SetTimerEx("TimerBanca5",16000,false,"i",playerid) ;
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)