unbreakable glass
#6

Quote:
Originally Posted by ABKPot
Посмотреть сообщение
I believe the only possible way is like this, I might be wrong. Try it:

pawn Код:
//On top of script
new objwindow; //Store the window object in this variable

//Somewhere in script - objwindow = CreateObject(); //Create your window object.

public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
    //If the player hit an object, and the object ID that was hit is our window 'objwindow'
    if(hittype == BULLET_HIT_TYPE_OBJECT && hitid == objwindow) return 0; //Return 0 to avoid damage
    else return 1;
}
Won't work, just tested it. Your method is somehow good though, try this:
pawn Код:
//On top of script
new objwindow; //Store the window object in this variable

objwindow = CreateObject(); //Create your window object.

public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
    //If the player hit an object, and the object ID that was hit is our window 'objwindow' it will create the window again.
    if(hittype == BULLET_HIT_TYPE_OBJECT && hitid == objwindow) return objwindow = CreateObject; // Type the same function you used in creating the object the first time.
    return 1;
} //Credit to ABKPot of course.
Reply


Messages In This Thread
unbreakable glass - by 9noober - 08.07.2014, 04:34
Re: unbreakable glass - by BroZeus - 08.07.2014, 04:49
Re: unbreakable glass - by 9noober - 08.07.2014, 05:08
Re: unbreakable glass - by 9noober - 08.07.2014, 05:11
Re: unbreakable glass - by ABKPot - 08.07.2014, 05:40
Re: unbreakable glass - by Cena44 - 08.07.2014, 10:08
Re: unbreakable glass - by 9noober - 01.08.2014, 04:53

Forum Jump:


Users browsing this thread: 1 Guest(s)