stock OnPlayerShootObject(playerid, objectid, playerobject) { //code return 1; }
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) { if(hittype == BULLET_HIT_TYPE_OBJECT || hittype == BULLET_HIT_TYPE_PLAYER_OBJECT) { OnPlayerShootObject(playerid, hitid, hittype == BULLET_HIT_TYPE_PLAYER_OBJECT ? 1 : 0); // you can desync shoot with return } return 1; }
There's a tutorial which is very well explained about OnPlayerShootObject , search for it.
|
Код:
stock OnPlayerShootObject(playerid, objectid, playerobject) { //code return 1; } Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) { if(hittype == BULLET_HIT_TYPE_OBJECT || hittype == BULLET_HIT_TYPE_PLAYER_OBJECT) { OnPlayerShootObject(playerid, hitid, hittype == BULLET_HIT_TYPE_PLAYER_OBJECT ? 1 : 0); // you can desync shoot with return } return 1; } UPD: And Streamer plugin can detect a shoot to dynamic object's (OnPlayerShootDynamicObject) |
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(hittype == BULLET_HIT_TYPE_OBJECT || hittype == BULLET_HIT_TYPE_PLAYER_OBJECT)
{
new ObjectID = Streamer_GetIntData(STREAMER_TYPE_OBJECT, hitid, E_STREAMER_MODEL_ID);
//ObjectID now should contain the model ID of the shooted object
}
}
I can't find it that's why i opened a thread about it
ye but i need the code bro... it doesn't help me you just gave me a blank script. i need the code that supposed to be inside of the stock. |