Hi
Habe ein Anti Teamkill gescriptet, nur is des buggy, denn es funzt nicht o.o hier die sachen
//Oben
new ANTITEAMKILLWARNINGS[MAX_PLAYERS];
#define WVANTITEAMKILLWARNS 2 //wie viel warns bekommt er
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
// hit sound
PlayerPlaySound(issuerid,17802,0.0,0.0,0.0);
// Anti team kill system...
if(gTeam[issuerid] == gTeam[playerid])
{
ANTITEAMKILLWARNINGS[playerid] ++;
if(ANTITEAMKILLWARNINGS[playerid] == WVANTITEAMKILLWARNS)
{
SendClientMessage(issuerid,Rot,"You have 2/2 Warns! You are kicked!");
SpielerSpeichern(issuerid);
Kick(issuerid);
new string[128];
format(string,sizeof(string),"You were kicked from the server! {FF0000}Reason: Team~Kill");
SendClientMessage(issuerid,Rot,string);
}
else if(ANTITEAMKILLWARNINGS[playerid] < WVANTITEAMKILLWARNS)
{
SendClientMessage(issuerid,Rot,"Dont make Team Kill! Or you will kicked!");
return 1;
}
}
return 1;
}
Danke im vorraus
Lg