oscar-broman / samp-weapon-config

A more consistent and responsive damage system with many new features
Apache License 2.0
91 stars 84 forks source link

Problem Team shot team dont work #205

Closed Nung0141 closed 2 years ago

Nung0141 commented 3 years ago

//public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart) public OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart) { if(issuerid == INVALID_PLAYER_ID) return 1; if(issuerid != INVALID_PLAYER_ID) { printf("debug 3 %s %s", PlayerShotPlayer[issuerid][playerid] = 1); PlayerShotPlayer[issuerid][playerid] = 1; UpdateXPTextdraw(playerid); new Float:HP; GetPlayerHealth(playerid, HP); if(pteam[issuerid] == TEAM_HUMAN) { if(pteam[playerid] == TEAM_HUMAN) { if(weapon == 0) { SetPlayerHealth(issuerid, HP - 15); GameTextForPlayer(issuerid,"~r~DO NOT ACCTACKER YOUR TEAM",6000,4); printf("debug 2 %s %s",pteam[issuerid] == TEAM_HUMAN,pteam[playerid] == TEAM_HUMAN); } } }

    printf("debug");
ADRFranklin commented 3 years ago

You are supposed to return 0; inside OnPlayerDamage if you don't want damage to be inflicted