unbreakable glass
#1

How can i make a unbreakable glass in samp??
Reply
#2

175 id of unbreakable glass in MTA
Reply
#3

but i want id 1649
Reply
#4

how to use setobjectmaterial to make unbreakable glass
Reply
#5

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;
}
EDIT: You must have 'lagcompensation' enabled.. I believe it is enabled by default.

https://sampwiki.blast.hk/wiki/Lag_Compensation
Reply
#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
#7

not works
can use setobjectmaterial??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)