[HELP]Door which destroyed only by explosion
#1

i want to create a door which, if a player want to enter, he must destroy the door with a explosion

if you have any idea how can i do that tell me
Reply
#2


put somewhete above main()

Код:
new doors;
put under OnGameModeInit()

Код:
doors = CreateObject( 2587, 0.0, 0.0, 0.0, 0, 0, 96 );
Код:
if(strcmp(cmd, "/ddoors", true) == 0)
	{
  	if(IsPlayerInRangeOfPoint(playerid, 5.0, 0.0,0.0,0.0))
  		{
     	new Float:x, Float:y, Float:z;
  	 		GetPlayerPos(playerid, x, y, z);
    	CreateExplosion(x+random(5), y+random(5), z+random(5), 12, 10.0);
    	DestroyObject(doors);
    }
    else
    {
      SendClientMessage(playerid, COLOR_RED, "You cant opend doors here!");
      return 1;
		}
	}
I have NOT tested it INgame, but in pawn compiler it compiles with no warnings and errors. This is just a small sample. And you have to change the cords with yours, also change object id with yours! Good luck!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)