SA-MP Forums Archive
[Help] i know to script, but dont how to do this .. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help] i know to script, but dont how to do this .. (/showthread.php?tid=82263)



[Help] i know to script, but dont how to do this .. - Melbourne - 17.06.2009

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



Re: [Help] i know to script, but dont how to do this .. - Klutty - 17.06.2009

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);

}

    }



Re: [Help] i know to script, but dont how to do this .. - Ignas1337 - 17.06.2009

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.