mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
*** empty log message ***
This commit is contained in:
parent
4800ab292c
commit
92eda7c214
@ -7,7 +7,7 @@
|
|||||||
static cell AMX_NATIVE_CALL get_user_astats(AMX *amx, cell *params) /* 6 param */
|
static cell AMX_NATIVE_CALL get_user_astats(AMX *amx, cell *params) /* 6 param */
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
int attacker = params[2];
|
int attacker = params[2];
|
||||||
CHECK_PLAYERRANGE(attacker);
|
CHECK_PLAYERRANGE(attacker);
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
@ -34,7 +34,7 @@ static cell AMX_NATIVE_CALL get_user_astats(AMX *amx, cell *params) /* 6 param *
|
|||||||
static cell AMX_NATIVE_CALL get_user_vstats(AMX *amx, cell *params) /* 6 param */
|
static cell AMX_NATIVE_CALL get_user_vstats(AMX *amx, cell *params) /* 6 param */
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
int victim = params[2];
|
int victim = params[2];
|
||||||
CHECK_PLAYERRANGE(victim);
|
CHECK_PLAYERRANGE(victim);
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
@ -61,7 +61,7 @@ static cell AMX_NATIVE_CALL get_user_vstats(AMX *amx, cell *params) /* 6 param *
|
|||||||
static cell AMX_NATIVE_CALL get_user_wrstats(AMX *amx, cell *params) /* 4 param */ // DEC-Weapon (round) stats (end)
|
static cell AMX_NATIVE_CALL get_user_wrstats(AMX *amx, cell *params) /* 4 param */ // DEC-Weapon (round) stats (end)
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
int weapon = params[2];
|
int weapon = params[2];
|
||||||
if (weapon<0||weapon>=MAX_WEAPONS+MAX_CWEAPONS){
|
if (weapon<0||weapon>=MAX_WEAPONS+MAX_CWEAPONS){
|
||||||
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weapon id %d", weapon);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weapon id %d", weapon);
|
||||||
@ -89,10 +89,7 @@ static cell AMX_NATIVE_CALL get_user_wrstats(AMX *amx, cell *params) /* 4 param
|
|||||||
static cell AMX_NATIVE_CALL get_user_wstats(AMX *amx, cell *params) /* 4 param */
|
static cell AMX_NATIVE_CALL get_user_wstats(AMX *amx, cell *params) /* 4 param */
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
if (index<1||index>gpGlobals->maxClients){
|
CHECK_PLAYERRANGE(index);
|
||||||
MF_RaiseAmxError(amx,AMX_ERR_NATIVE);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
int weapon = params[2];
|
int weapon = params[2];
|
||||||
if (weapon<0||weapon>=MAX_WEAPONS+MAX_CWEAPONS){
|
if (weapon<0||weapon>=MAX_WEAPONS+MAX_CWEAPONS){
|
||||||
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weapon id %d", weapon);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weapon id %d", weapon);
|
||||||
@ -128,7 +125,7 @@ static cell AMX_NATIVE_CALL reset_user_wstats(AMX *amx, cell *params) /* 6 param
|
|||||||
static cell AMX_NATIVE_CALL get_user_rstats(AMX *amx, cell *params) /* 3 param */
|
static cell AMX_NATIVE_CALL get_user_rstats(AMX *amx, cell *params) /* 3 param */
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
if (pPlayer->rank){
|
if (pPlayer->rank){
|
||||||
cell *cpStats = MF_GetAmxAddr(amx,params[2]);
|
cell *cpStats = MF_GetAmxAddr(amx,params[2]);
|
||||||
@ -150,7 +147,7 @@ static cell AMX_NATIVE_CALL get_user_rstats(AMX *amx, cell *params) /* 3 param *
|
|||||||
static cell AMX_NATIVE_CALL get_user_stats(AMX *amx, cell *params) /* 3 param */
|
static cell AMX_NATIVE_CALL get_user_stats(AMX *amx, cell *params) /* 3 param */
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
if ( pPlayer->rank ){
|
if ( pPlayer->rank ){
|
||||||
cell *cpStats = MF_GetAmxAddr(amx,params[2]);
|
cell *cpStats = MF_GetAmxAddr(amx,params[2]);
|
||||||
@ -176,7 +173,7 @@ static cell AMX_NATIVE_CALL get_user_stats(AMX *amx, cell *params) /* 3 param */
|
|||||||
static cell AMX_NATIVE_CALL get_user_stats2(AMX *amx, cell *params) /* 3 param */
|
static cell AMX_NATIVE_CALL get_user_stats2(AMX *amx, cell *params) /* 3 param */
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
if ( pPlayer->rank ){
|
if ( pPlayer->rank ){
|
||||||
cell *cpStats = MF_GetAmxAddr(amx,params[2]);
|
cell *cpStats = MF_GetAmxAddr(amx,params[2]);
|
||||||
@ -275,10 +272,10 @@ static cell AMX_NATIVE_CALL custom_wpn_dmg(AMX *amx, cell *params){ // wid,att,v
|
|||||||
}
|
}
|
||||||
|
|
||||||
int att = params[2];
|
int att = params[2];
|
||||||
CHECK_PLAYER(att);
|
CHECK_PLAYERRANGE(att);
|
||||||
|
|
||||||
int vic = params[3];
|
int vic = params[3];
|
||||||
CHECK_PLAYER(vic);
|
CHECK_PLAYERRANGE(vic);
|
||||||
|
|
||||||
int dmg = params[4];
|
int dmg = params[4];
|
||||||
if ( dmg<1 ){
|
if ( dmg<1 ){
|
||||||
@ -315,7 +312,7 @@ static cell AMX_NATIVE_CALL custom_wpn_dmg(AMX *amx, cell *params){ // wid,att,v
|
|||||||
|
|
||||||
static cell AMX_NATIVE_CALL custom_wpn_shot(AMX *amx, cell *params){ // player,wid
|
static cell AMX_NATIVE_CALL custom_wpn_shot(AMX *amx, cell *params){ // player,wid
|
||||||
int index = params[2];
|
int index = params[2];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
|
|
||||||
int weapon = params[1];
|
int weapon = params[1];
|
||||||
if ( weapon < MAX_WEAPONS || weapon >= MAX_WEAPONS+MAX_CWEAPONS || !weaponData[weapon].used ){
|
if ( weapon < MAX_WEAPONS || weapon >= MAX_WEAPONS+MAX_CWEAPONS || !weaponData[weapon].used ){
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
static cell AMX_NATIVE_CALL get_user_astats(AMX *amx, cell *params) /* 6 param */
|
static cell AMX_NATIVE_CALL get_user_astats(AMX *amx, cell *params) /* 6 param */
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
int attacker = params[2];
|
int attacker = params[2];
|
||||||
CHECK_PLAYERRANGE(attacker);
|
CHECK_PLAYERRANGE(attacker);
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
@ -62,7 +62,7 @@ static cell AMX_NATIVE_CALL get_user_astats(AMX *amx, cell *params) /* 6 param *
|
|||||||
static cell AMX_NATIVE_CALL get_user_vstats(AMX *amx, cell *params) /* 6 param */
|
static cell AMX_NATIVE_CALL get_user_vstats(AMX *amx, cell *params) /* 6 param */
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
int victim = params[2];
|
int victim = params[2];
|
||||||
CHECK_PLAYERRANGE(victim);
|
CHECK_PLAYERRANGE(victim);
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
@ -89,7 +89,7 @@ static cell AMX_NATIVE_CALL get_user_vstats(AMX *amx, cell *params) /* 6 param *
|
|||||||
static cell AMX_NATIVE_CALL get_user_wlstats(AMX *amx, cell *params) /* 4 param */ // DEC-Weapon (round) stats (end)
|
static cell AMX_NATIVE_CALL get_user_wlstats(AMX *amx, cell *params) /* 4 param */ // DEC-Weapon (round) stats (end)
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
int weapon = params[2];
|
int weapon = params[2];
|
||||||
if (weapon<0||weapon>=DODMAX_WEAPONS){
|
if (weapon<0||weapon>=DODMAX_WEAPONS){
|
||||||
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weapon id %d", weapon);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weapon id %d", weapon);
|
||||||
@ -118,7 +118,7 @@ static cell AMX_NATIVE_CALL get_user_wlstats(AMX *amx, cell *params) /* 4 param
|
|||||||
static cell AMX_NATIVE_CALL get_user_wrstats(AMX *amx, cell *params) /* 4 param */ // DEC-Weapon (round) stats (end)
|
static cell AMX_NATIVE_CALL get_user_wrstats(AMX *amx, cell *params) /* 4 param */ // DEC-Weapon (round) stats (end)
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index)
|
CHECK_PLAYERRANGE(index)
|
||||||
int weapon = params[2];
|
int weapon = params[2];
|
||||||
if (weapon<0||weapon>=DODMAX_WEAPONS){
|
if (weapon<0||weapon>=DODMAX_WEAPONS){
|
||||||
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weapon id %d", weapon);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weapon id %d", weapon);
|
||||||
@ -147,7 +147,7 @@ static cell AMX_NATIVE_CALL get_user_wrstats(AMX *amx, cell *params) /* 4 param
|
|||||||
static cell AMX_NATIVE_CALL get_user_wstats(AMX *amx, cell *params) /* 4 param */
|
static cell AMX_NATIVE_CALL get_user_wstats(AMX *amx, cell *params) /* 4 param */
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index)
|
CHECK_PLAYERRANGE(index)
|
||||||
int weapon = params[2];
|
int weapon = params[2];
|
||||||
if (weapon<0||weapon>=DODMAX_WEAPONS){
|
if (weapon<0||weapon>=DODMAX_WEAPONS){
|
||||||
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weapon id %d", weapon);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weapon id %d", weapon);
|
||||||
@ -176,7 +176,7 @@ static cell AMX_NATIVE_CALL get_user_wstats(AMX *amx, cell *params) /* 4 param *
|
|||||||
static cell AMX_NATIVE_CALL reset_user_wstats(AMX *amx, cell *params) /* 6 param */
|
static cell AMX_NATIVE_CALL reset_user_wstats(AMX *amx, cell *params) /* 6 param */
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
pPlayer->restartStats();
|
pPlayer->restartStats();
|
||||||
return 1;
|
return 1;
|
||||||
@ -185,7 +185,7 @@ static cell AMX_NATIVE_CALL reset_user_wstats(AMX *amx, cell *params) /* 6 param
|
|||||||
static cell AMX_NATIVE_CALL get_user_stats(AMX *amx, cell *params) /* 3 param */
|
static cell AMX_NATIVE_CALL get_user_stats(AMX *amx, cell *params) /* 3 param */
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
if ( pPlayer->ingame ){
|
if ( pPlayer->ingame ){
|
||||||
cell *cpStats = MF_GetAmxAddr(amx,params[2]);
|
cell *cpStats = MF_GetAmxAddr(amx,params[2]);
|
||||||
@ -210,7 +210,7 @@ static cell AMX_NATIVE_CALL get_user_stats(AMX *amx, cell *params) /* 3 param */
|
|||||||
static cell AMX_NATIVE_CALL get_user_lstats(AMX *amx, cell *params) /* 3 param */
|
static cell AMX_NATIVE_CALL get_user_lstats(AMX *amx, cell *params) /* 3 param */
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
if (pPlayer->ingame){
|
if (pPlayer->ingame){
|
||||||
cell *cpStats = MF_GetAmxAddr(amx,params[2]);
|
cell *cpStats = MF_GetAmxAddr(amx,params[2]);
|
||||||
@ -233,7 +233,7 @@ static cell AMX_NATIVE_CALL get_user_lstats(AMX *amx, cell *params) /* 3 param *
|
|||||||
static cell AMX_NATIVE_CALL get_user_rstats(AMX *amx, cell *params) /* 3 param */
|
static cell AMX_NATIVE_CALL get_user_rstats(AMX *amx, cell *params) /* 3 param */
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index)
|
CHECK_PLAYERRANGE(index)
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
if (pPlayer->ingame){
|
if (pPlayer->ingame){
|
||||||
cell *cpStats = MF_GetAmxAddr(amx,params[2]);
|
cell *cpStats = MF_GetAmxAddr(amx,params[2]);
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
static cell AMX_NATIVE_CALL get_user_astats(AMX *amx, cell *params) /* 6 param */
|
static cell AMX_NATIVE_CALL get_user_astats(AMX *amx, cell *params) /* 6 param */
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
int attacker = params[2];
|
int attacker = params[2];
|
||||||
CHECK_PLAYERRANGE(attacker);
|
CHECK_PLAYERRANGE(attacker);
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
@ -63,7 +63,7 @@ static cell AMX_NATIVE_CALL get_user_astats(AMX *amx, cell *params) /* 6 param *
|
|||||||
static cell AMX_NATIVE_CALL get_user_vstats(AMX *amx, cell *params) /* 6 param */
|
static cell AMX_NATIVE_CALL get_user_vstats(AMX *amx, cell *params) /* 6 param */
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
int victim = params[2];
|
int victim = params[2];
|
||||||
CHECK_PLAYERRANGE(victim);
|
CHECK_PLAYERRANGE(victim);
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
@ -90,7 +90,7 @@ static cell AMX_NATIVE_CALL get_user_vstats(AMX *amx, cell *params) /* 6 param *
|
|||||||
static cell AMX_NATIVE_CALL get_user_wrstats(AMX *amx, cell *params) /* 4 param */ // DEC-Weapon (round) stats (end)
|
static cell AMX_NATIVE_CALL get_user_wrstats(AMX *amx, cell *params) /* 4 param */ // DEC-Weapon (round) stats (end)
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
int weapon = params[2];
|
int weapon = params[2];
|
||||||
if (weapon<0||weapon>=TFCMAX_WEAPONS){
|
if (weapon<0||weapon>=TFCMAX_WEAPONS){
|
||||||
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weapon id %d", weapon);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weapon id %d", weapon);
|
||||||
@ -118,7 +118,7 @@ static cell AMX_NATIVE_CALL get_user_wrstats(AMX *amx, cell *params) /* 4 param
|
|||||||
static cell AMX_NATIVE_CALL get_user_wstats(AMX *amx, cell *params) /* 4 param */
|
static cell AMX_NATIVE_CALL get_user_wstats(AMX *amx, cell *params) /* 4 param */
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
int weapon = params[2];
|
int weapon = params[2];
|
||||||
if (weapon<0||weapon>=TFCMAX_WEAPONS){
|
if (weapon<0||weapon>=TFCMAX_WEAPONS){
|
||||||
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weapon id %d", weapon);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weapon id %d", weapon);
|
||||||
@ -146,7 +146,7 @@ static cell AMX_NATIVE_CALL get_user_wstats(AMX *amx, cell *params) /* 4 param *
|
|||||||
static cell AMX_NATIVE_CALL reset_user_wstats(AMX *amx, cell *params) /* 6 param */
|
static cell AMX_NATIVE_CALL reset_user_wstats(AMX *amx, cell *params) /* 6 param */
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
GET_PLAYER_POINTER_I(index)->restartStats();
|
GET_PLAYER_POINTER_I(index)->restartStats();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -154,7 +154,7 @@ static cell AMX_NATIVE_CALL reset_user_wstats(AMX *amx, cell *params) /* 6 param
|
|||||||
static cell AMX_NATIVE_CALL get_user_stats(AMX *amx, cell *params) /* 3 param */
|
static cell AMX_NATIVE_CALL get_user_stats(AMX *amx, cell *params) /* 3 param */
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
if ( pPlayer->rank ){
|
if ( pPlayer->rank ){
|
||||||
cell *cpStats = MF_GetAmxAddr(amx,params[2]);
|
cell *cpStats = MF_GetAmxAddr(amx,params[2]);
|
||||||
@ -178,7 +178,7 @@ static cell AMX_NATIVE_CALL get_user_stats(AMX *amx, cell *params) /* 3 param */
|
|||||||
static cell AMX_NATIVE_CALL get_user_rstats(AMX *amx, cell *params) /* 3 param */
|
static cell AMX_NATIVE_CALL get_user_rstats(AMX *amx, cell *params) /* 3 param */
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
if (pPlayer->rank){
|
if (pPlayer->rank){
|
||||||
cell *cpStats = MF_GetAmxAddr(amx,params[2]);
|
cell *cpStats = MF_GetAmxAddr(amx,params[2]);
|
||||||
@ -260,10 +260,10 @@ static cell AMX_NATIVE_CALL cwpn_dmg(AMX *amx, cell *params){ // wid,att,vic,dmg
|
|||||||
}
|
}
|
||||||
|
|
||||||
int att = params[2];
|
int att = params[2];
|
||||||
CHECK_PLAYER(att);
|
CHECK_PLAYERRANGE(att);
|
||||||
|
|
||||||
int vic = params[3];
|
int vic = params[3];
|
||||||
CHECK_PLAYER(vic);
|
CHECK_PLAYERRANGE(vic);
|
||||||
|
|
||||||
int dmg = params[4];
|
int dmg = params[4];
|
||||||
if ( dmg<1 ){
|
if ( dmg<1 ){
|
||||||
@ -300,7 +300,7 @@ static cell AMX_NATIVE_CALL cwpn_dmg(AMX *amx, cell *params){ // wid,att,vic,dmg
|
|||||||
|
|
||||||
static cell AMX_NATIVE_CALL cwpn_shot(AMX *amx, cell *params){ // player,wid
|
static cell AMX_NATIVE_CALL cwpn_shot(AMX *amx, cell *params){ // player,wid
|
||||||
int index = params[2];
|
int index = params[2];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
|
|
||||||
int weapon = params[1];
|
int weapon = params[1];
|
||||||
if ( weapon < TFCMAX_WEAPONS-TFCMAX_CUSTOMWPNS ){
|
if ( weapon < TFCMAX_WEAPONS-TFCMAX_CUSTOMWPNS ){
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
static cell AMX_NATIVE_CALL get_user_astats(AMX *amx, cell *params) /* 6 param */
|
static cell AMX_NATIVE_CALL get_user_astats(AMX *amx, cell *params) /* 6 param */
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
int attacker = params[2];
|
int attacker = params[2];
|
||||||
CHECK_PLAYERRANGE(attacker);
|
CHECK_PLAYERRANGE(attacker);
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
@ -63,7 +63,7 @@ static cell AMX_NATIVE_CALL get_user_astats(AMX *amx, cell *params) /* 6 param *
|
|||||||
static cell AMX_NATIVE_CALL get_user_vstats(AMX *amx, cell *params) /* 6 param */
|
static cell AMX_NATIVE_CALL get_user_vstats(AMX *amx, cell *params) /* 6 param */
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
int victim = params[2];
|
int victim = params[2];
|
||||||
CHECK_PLAYERRANGE(victim);
|
CHECK_PLAYERRANGE(victim);
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
@ -90,7 +90,7 @@ static cell AMX_NATIVE_CALL get_user_vstats(AMX *amx, cell *params) /* 6 param *
|
|||||||
static cell AMX_NATIVE_CALL get_user_wrstats(AMX *amx, cell *params) /* 4 param */ // DEC-Weapon (round) stats (end)
|
static cell AMX_NATIVE_CALL get_user_wrstats(AMX *amx, cell *params) /* 4 param */ // DEC-Weapon (round) stats (end)
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
int weapon = params[2];
|
int weapon = params[2];
|
||||||
if (weapon<0||weapon>=TSMAX_WEAPONS){
|
if (weapon<0||weapon>=TSMAX_WEAPONS){
|
||||||
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weapon id %d", weapon);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weapon id %d", weapon);
|
||||||
@ -118,7 +118,7 @@ static cell AMX_NATIVE_CALL get_user_wrstats(AMX *amx, cell *params) /* 4 param
|
|||||||
static cell AMX_NATIVE_CALL get_user_wstats(AMX *amx, cell *params) /* 4 param */
|
static cell AMX_NATIVE_CALL get_user_wstats(AMX *amx, cell *params) /* 4 param */
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
int weapon = params[2];
|
int weapon = params[2];
|
||||||
if (weapon<0||weapon>=TSMAX_WEAPONS){
|
if (weapon<0||weapon>=TSMAX_WEAPONS){
|
||||||
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weapon id %d", weapon);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weapon id %d", weapon);
|
||||||
@ -146,7 +146,7 @@ static cell AMX_NATIVE_CALL get_user_wstats(AMX *amx, cell *params) /* 4 param *
|
|||||||
static cell AMX_NATIVE_CALL reset_user_wstats(AMX *amx, cell *params) /* 6 param */
|
static cell AMX_NATIVE_CALL reset_user_wstats(AMX *amx, cell *params) /* 6 param */
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
GET_PLAYER_POINTER_I(index)->restartStats();
|
GET_PLAYER_POINTER_I(index)->restartStats();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -154,7 +154,7 @@ static cell AMX_NATIVE_CALL reset_user_wstats(AMX *amx, cell *params) /* 6 param
|
|||||||
static cell AMX_NATIVE_CALL get_user_stats(AMX *amx, cell *params) /* 3 param */
|
static cell AMX_NATIVE_CALL get_user_stats(AMX *amx, cell *params) /* 3 param */
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
if ( pPlayer->rank ){
|
if ( pPlayer->rank ){
|
||||||
cell *cpStats = MF_GetAmxAddr(amx,params[2]);
|
cell *cpStats = MF_GetAmxAddr(amx,params[2]);
|
||||||
@ -178,7 +178,7 @@ static cell AMX_NATIVE_CALL get_user_stats(AMX *amx, cell *params) /* 3 param */
|
|||||||
static cell AMX_NATIVE_CALL get_user_rstats(AMX *amx, cell *params) /* 3 param */
|
static cell AMX_NATIVE_CALL get_user_rstats(AMX *amx, cell *params) /* 3 param */
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
if (pPlayer->rank){
|
if (pPlayer->rank){
|
||||||
cell *cpStats = MF_GetAmxAddr(amx,params[2]);
|
cell *cpStats = MF_GetAmxAddr(amx,params[2]);
|
||||||
@ -260,10 +260,10 @@ static cell AMX_NATIVE_CALL cwpn_dmg(AMX *amx, cell *params){ // wid,att,vic,dmg
|
|||||||
}
|
}
|
||||||
|
|
||||||
int att = params[2];
|
int att = params[2];
|
||||||
CHECK_PLAYER(att);
|
CHECK_PLAYERRANGE(att);
|
||||||
|
|
||||||
int vic = params[3];
|
int vic = params[3];
|
||||||
CHECK_PLAYER(vic);
|
CHECK_PLAYERRANGE(vic);
|
||||||
|
|
||||||
int dmg = params[4];
|
int dmg = params[4];
|
||||||
if ( dmg<1 ){
|
if ( dmg<1 ){
|
||||||
@ -300,7 +300,7 @@ static cell AMX_NATIVE_CALL cwpn_dmg(AMX *amx, cell *params){ // wid,att,vic,dmg
|
|||||||
|
|
||||||
static cell AMX_NATIVE_CALL cwpn_shot(AMX *amx, cell *params){ // player,wid
|
static cell AMX_NATIVE_CALL cwpn_shot(AMX *amx, cell *params){ // player,wid
|
||||||
int index = params[2];
|
int index = params[2];
|
||||||
CHECK_PLAYER(index);
|
CHECK_PLAYERRANGE(index);
|
||||||
|
|
||||||
int weapon = params[1];
|
int weapon = params[1];
|
||||||
if ( weapon < TSMAX_WEAPONS-TSMAX_CUSTOMWPNS ){
|
if ( weapon < TSMAX_WEAPONS-TSMAX_CUSTOMWPNS ){
|
||||||
|
Loading…
Reference in New Issue
Block a user