20.04.2016, 10:09
I wanted to make a anti clan shoot system , but i does not work.
What is the problem?
What is the problem?
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart) { if(issuerid != INVALID_PLAYER_ID) { new string[256]; new clanfile[256]; format(clanfile, sizeof(clanfile), "/Clan/user/%s.ini",dini_Get("/Clan/AllUserID.ini",Name(playerid))); new clanfile1[256]; format(clanfile1, sizeof(clanfile1), "/Clan/user/%s.ini",dini_Get("/Clan/AllUserID.ini",Name(issuerid))); if(strcmp(dini_Get(clanfile,"PlayerClan"), dini_Get(clanfile1,"PlayerClan"))) { return 1; } else { new Float:HP; GetPlayerHealth(playerid, HP); SetPlayerHealth(playerid,HP - 0); SendClientMessage(issuerid,COLOR_RED,"[CLAN] {FFFFFF}Do not shoot your clan member."); } } return 1; }