Quote:
Originally Posted by _Zume
pawn Код:
new _tWeapon[MAX_PLAYERS];
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) { if(playerid != INVALID_PLAYER_ID) { if(weaponid != WEAPON_SILENCED && _tWeapon[playerid] < gettime()) { ProxDetectorEx(playerid, ((weaponid == WEAPON_AK47 || weaponid == WEAPON_M4 || weaponid == WEAPON_RIFLE || weaponid == WEAPON_SNIPER) ? (45.0) : (30.0)), COLOR_DO, "* %s ha disparado con %s.", _Name(playerid), GetWeaponNameEx(weaponid)); _tWeapon[playerid] = gettime()+15; } } return 1; }
Para la funciуn de GetWeaponNameEx fнjate en el fix de la funciуn: https://sampwiki.blast.hk/wiki/GetWeaponName
Sй el punto que le vas a dar por eso le puse con ProxDetector, ProxDetectorEx es una ediciуn que le apliquй nada mбs.
|
Obtengo error con el ProxDetector, no lo tengo definido, y las definiciones que encontre no funcionan.
Los demбs cуdigos me funcionan, pero sуlo cuando el disparo impacta en otro jugador, lo que yo quiero es que el mensaje salga por mбs que el disparo vaya al suelo, al aire, etcйtera.