Hallo,
Wie die Überschrift verrät habe ich ein Problem bezügl. des Tamkill!
Ich weis nicht wie ich es schildern soll aber ich schreibe einfach alles was damit zutun hat!
Also eigentlich soll es so sein dass wenn jemand in seinem Eigenen Team killt soll er für 1 Minute gefreezed werden,
sollte es nochmals passieren = 2 Minuten Freeze, nochmals?! =Kick, und wenn es nochmals vorkommt =Ban.
Ps: Beim Teamkill bekommt der gekillte die Nachicht: "Teamkill not allowed".
*Und nach dem 2 Mal bekommt der gekillte den Kick!und bei den anderen steht: was kicked... und eine Zeile drunter: was banned.
Also:
//news
new TeamKill[MAX_PLAYERS];
new TeamKill2[MAX_PLAYERS];
new TeamKill3[MAX_PLAYERS];
//forwards
forward TeamKillTimer(playerid);
forward TeamKillTimer2(playerid);
_____________________________________________
OngameModInit
SetTimer("TeamkillTimer",60000,1);
SetTimer("TeamKillTimer2",12000,1);
_____________________________________________
public OnPlayerDeath
{
if(Team[playerid] == Team[killerid])
{
SetTimerEx("TeamKillTimer",6000,0,"i", killerid);
GameTextForPlayer(playerid, "~r~Teamkill ~n~~w~Freeze for 1 minute.", 6000, 3);
TogglePlayerControllable(killerid, false);
}
if(Team[playerid] == Team[killerid] && TeamKill[playerid] == 1)
{
SetTimerEx("TeamKillTimer2",12000,0,"i", killerid);
GameTextForPlayer(playerid, "~r~Teamkill ~n~~w~Freeze for 2 minutes.", 12000, 3);
TogglePlayerControllable(killerid, false);
}
if(Team[playerid] == Team[killerid] && TeamKill2[playerid] == 1)
{
TogglePlayerControllable(killerid, false);
new Member[MAX_PLAYER_NAME], msg[56];
format(msg, sizeof(msg),"[AUTO-KICK] kicked [%s] with Reason: Teamkill [3/4 Warns]", Member, msg);
SendClientMessageToAll(ROT,msg);
Kick(playerid);
TeamKill3[playerid] = 1;
}
if(Team[playerid] == Team[killerid] && TeamKill3[playerid] == 1)
{
TogglePlayerControllable(killerid, false);
new Member[MAX_PLAYER_NAME], msg[56];
format(msg, sizeof(msg),"[AUTO-KICK] banned [%s] with Reason: Teamkill [4/4 Warns]", Member, msg);
SendClientMessageToAll(ROT,msg);
Ban(playerid);
}
//Druhter is noch was also nicht wundern wegen der Klammer ;)
______________________________________________________________________________________
Ganz unten im Script habe ich das:
public TeamKillTimer(playerid)
{
SendClientMessage(playerid, GRÜN, "1 minute over, unfreezed!");
TogglePlayerControllable(playerid, true);
TeamKill[playerid] = 1;
return 1;
}
public TeamKillTimer2(playerid)
{
SendClientMessage(playerid, GRÜN, "2 Minutes over, unfrezzed!");
TogglePlayerControllable(playerid, true);
TeamKill2[playerid] = 1;
return 1;
}
So es ist nun alles dabei ich hoffe jemand kann mir helfen :(, SufU auch benutzt!
MFG.
//edit: wichtiger Satz vergessen!* + Rechtschreibung.