19.02.2014, 01:46
Funeral, tenho uma ideia aqui, crie uma nova callback:
A ideia principal й chamar a funзгo a cada vez q uma das 3 forem chamadas, mas desta forma acima, chamarб 3 vezes a funзгo, foi sу uma ideia do que fazer... Caso tenha uma linha de raciocнnio me diga pelo skype (themonkeylee), e eu te ajudo a fazer o que queres...
Код:
/* 0 = none 1 = player 2 = vehicle 3 = object 4 = playerobject */ public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) { switch(hittype) { case 0: CallRemoteFunction("OnPlayerChangeDamage", "ddd", playerid, 1, 0); case 1: CallRemoteFunction("OnPlayerChangeDamage", "ddd", playerid, 1, 1); case 2: CallRemoteFunction("OnPlayerChangeDamage", "ddd", playerid, 1, 2); case 3: CallRemoteFunction("OnPlayerChangeDamage", "ddd", playerid, 1, 3); case 4: CallRemoteFunction("OnPlayerChangeDamage", "ddd", playerid, 1, 4); } return 1; } public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart) { return CallRemoteFunction("OnPlayerChangeDamage", "ddd", playerid, 2, 0); } public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart) { return CallRemoteFunction("OnPlayerChangeDamage", "ddd", playerid, 3, 0); } //Tipos de calledby: //1 = onplayerweaponshot //2 = onplayergivedamage //3 = onplayertakedamage forward OnPlayerChangeDamage(playerid, calledby, hittype = 0);// valor padrгo 0 public OnPlayerChangeDamage(playerid, calledby, hittype = 0) { return 0; }