[Help] i know to script, but dont how to do this ..
#1

I want to build an Anti Team Killing System ,
if i will try to shoot at my teammate ,
The bullets will has no effect .
Reply
#2

I dont know how to do that, but I got some code that if you kill a teammate you get - money..

pawn Код:
// Under OnPlayerDeath
 if(killerid == INVALID_PLAYER_ID) {

    SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);

    } else {

    if(gTeam[killerid] != gTeam[playerid]) {

        // Valid kill

        SendDeathMessage(killerid,playerid,reason);

            SetPlayerScore(killerid,GetPlayerScore(killerid)+1);

            GivePlayerMoney(killerid, 1000);

}

        else {

            // Team Kill

        new warning[256];

        format(warning, sizeof(warning), "Team killing is not allowed here!");

        SendClientMessage(killerid, COLOR_RED, warning);

        SendDeathMessage(killerid,playerid,reason);

        GivePlayerMoney(killerid, -1000);

        SetPlayerScore(killerid, GetPlayerScore(killerid) - 1);

}

    }
Reply
#3

that's not what he wanted... I beleave what you need can be done by assigning players to a single team and uhh is there a FF toggle or something? Idk, check the wiki.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)