mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
added debug msgs
This commit is contained in:
parent
deeb2f3cf9
commit
63aef3bcee
@ -37,12 +37,12 @@ static cell AMX_NATIVE_CALL get_user_astats(AMX *amx, cell *params) /* 6 param *
|
|||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
if (index<1||index>gpGlobals->maxClients){
|
if (index<1||index>gpGlobals->maxClients){
|
||||||
MF_RaiseAmxError(amx,AMX_ERR_NATIVE);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d", index);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
int attacker = params[2];
|
int attacker = params[2];
|
||||||
if (attacker<0||attacker>gpGlobals->maxClients){
|
if (attacker<0||attacker>gpGlobals->maxClients){
|
||||||
MF_RaiseAmxError(amx,AMX_ERR_NATIVE);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid attacker %d", attacker);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
@ -70,12 +70,12 @@ static cell AMX_NATIVE_CALL get_user_vstats(AMX *amx, cell *params) /* 6 param *
|
|||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
if (index<1||index>gpGlobals->maxClients){
|
if (index<1||index>gpGlobals->maxClients){
|
||||||
MF_RaiseAmxError(amx,AMX_ERR_NATIVE);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d", index);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
int victim = params[2];
|
int victim = params[2];
|
||||||
if (victim<0||victim>gpGlobals->maxClients){
|
if (victim<0||victim>gpGlobals->maxClients){
|
||||||
MF_RaiseAmxError(amx,AMX_ERR_NATIVE);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid victim %d", victim);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
@ -103,12 +103,12 @@ static cell AMX_NATIVE_CALL get_user_wrstats(AMX *amx, cell *params) /* 4 param
|
|||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
if (index<1||index>gpGlobals->maxClients){
|
if (index<1||index>gpGlobals->maxClients){
|
||||||
MF_RaiseAmxError(amx,AMX_ERR_NATIVE);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d", index);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
int weapon = params[2];
|
int weapon = params[2];
|
||||||
if (weapon<0||weapon>=TSMAX_WEAPONS){
|
if (weapon<0||weapon>=TSMAX_WEAPONS){
|
||||||
MF_RaiseAmxError(amx,AMX_ERR_NATIVE);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weapon %d", weapon);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
@ -134,12 +134,12 @@ 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){
|
if (index<1||index>gpGlobals->maxClients){
|
||||||
MF_RaiseAmxError(amx,AMX_ERR_NATIVE);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d", index);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
int weapon = params[2];
|
int weapon = params[2];
|
||||||
if (weapon<0||weapon>=TSMAX_WEAPONS){
|
if (weapon<0||weapon>=TSMAX_WEAPONS){
|
||||||
MF_RaiseAmxError(amx,AMX_ERR_NATIVE);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weapon %d", weapon);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
@ -165,7 +165,7 @@ static cell AMX_NATIVE_CALL reset_user_wstats(AMX *amx, cell *params) /* 6 param
|
|||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
if (index<1||index>gpGlobals->maxClients){
|
if (index<1||index>gpGlobals->maxClients){
|
||||||
MF_RaiseAmxError(amx,AMX_ERR_NATIVE);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d", index);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
GET_PLAYER_POINTER_I(index)->restartStats();
|
GET_PLAYER_POINTER_I(index)->restartStats();
|
||||||
@ -176,7 +176,7 @@ static cell AMX_NATIVE_CALL get_user_stats(AMX *amx, cell *params) /* 3 param */
|
|||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
if (index<1||index>gpGlobals->maxClients){
|
if (index<1||index>gpGlobals->maxClients){
|
||||||
MF_RaiseAmxError(amx,AMX_ERR_NATIVE);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d", index);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
@ -203,7 +203,7 @@ static cell AMX_NATIVE_CALL get_user_rstats(AMX *amx, cell *params) /* 3 param *
|
|||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
if (index<1||index>gpGlobals->maxClients){
|
if (index<1||index>gpGlobals->maxClients){
|
||||||
MF_RaiseAmxError(amx,AMX_ERR_NATIVE);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d", index);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
@ -282,31 +282,31 @@ static cell AMX_NATIVE_CALL register_cwpn(AMX *amx, cell *params){ // name,logna
|
|||||||
static cell AMX_NATIVE_CALL cwpn_dmg(AMX *amx, cell *params){ // wid,att,vic,dmg,hp=0
|
static cell AMX_NATIVE_CALL cwpn_dmg(AMX *amx, cell *params){ // wid,att,vic,dmg,hp=0
|
||||||
int weapon = params[1];
|
int weapon = params[1];
|
||||||
if ( weapon < TSMAX_WEAPONS-TSMAX_CUSTOMWPNS ){ // only for custom weapons
|
if ( weapon < TSMAX_WEAPONS-TSMAX_CUSTOMWPNS ){ // only for custom weapons
|
||||||
MF_RaiseAmxError(amx,AMX_ERR_NATIVE);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weapon %d", weapon);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int att = params[2];
|
int att = params[2];
|
||||||
if (att<1||att>gpGlobals->maxClients){
|
if (att<1||att>gpGlobals->maxClients){
|
||||||
MF_RaiseAmxError(amx,AMX_ERR_NATIVE);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid attacker %d", att);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int vic = params[3];
|
int vic = params[3];
|
||||||
if (vic<1||vic>gpGlobals->maxClients){
|
if (vic<1||vic>gpGlobals->maxClients){
|
||||||
MF_RaiseAmxError(amx,AMX_ERR_NATIVE);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid victim %d", vic);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dmg = params[4];
|
int dmg = params[4];
|
||||||
if ( dmg<1 ){
|
if ( dmg<1 ){
|
||||||
MF_RaiseAmxError(amx,AMX_ERR_NATIVE);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid damage %d", dmg);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int aim = params[5];
|
int aim = params[5];
|
||||||
if ( aim < 0 || aim > 7 ){
|
if ( aim < 0 || aim > 7 ){
|
||||||
MF_RaiseAmxError(amx,AMX_ERR_NATIVE);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid aim %d", aim);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user