SA-MP Forums Archive
Hello - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Hello (/showthread.php?tid=596540)



Hello - Mostafa5 - 19.12.2015

Hello guys, i need anti destroying box how i can get it ?


Re: Hello - prineside - 19.12.2015

Anti destroying box? Is it a box model which can't be broken?
SA-MP doesn't allow us to set this behaviour for objects, so there are 2 ways for you to choose from:
- Search for the same box but without "breakable" behaviour
- Destoroy object by timer / when someone shot it and re-create at the same position

Or is it some other kind of box you are asking for?


Re: Hello - Mostafa5 - 19.12.2015

i have zombie gamemode, all i need is when player shoot the box send message to the admin's !


Re: Hello - prineside - 19.12.2015

https://sampwiki.blast.hk/wiki/OnPlayerWeaponShot
PHP код:
public OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ)
{
    if ( 
hittype == BULLET_HIT_TYPE_OBJECT && hitid == [Box object ID] ) {
        
// playerid shot box, here you can send message to admins 
    
}
    return 
1;