Hey,
Wie manche schon wissen habe ich ja jetzt ein Anti Teamkill System
und da kommt schon der Erste Fehler/Problem/Wunsch, wie man es nennen möchte).
Wie muss ich es schreiben dass wenn er die 3/3 Warns voll hat, gekickt wird°-°?
Hier der Auschnitt (wie ihr seht habe ich scho nden Anfang gemacht /aber falsch xD)
²Zeile: Ab Zeile 26 geht´s los!
if(killerid != INVALID_PLAYER_ID)
{
if(Team[playerid] == Team[killerid])
{
TeamKills[killerid]++;
if(TeamKills[killerid] == 1)
{
GameTextForPlayer(playerid, "~y~Teamkill ~r~not allowed!~n~~r~1/3 Warnings!", 6000, 1);
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 1);
SetPlayerScore(playerid, -2);
SetPlayerPos(playerid, 1551.7120, -1675.3322, 15.9687);
SetPlayerFacingAngle(playerid, 91.0272);
SetPlayerSkin(playerid, 137);
}
if(TeamKills[killerid] == 2)
{
GameTextForPlayer(playerid, "~y~Teamkill ~r~not allowed!~n~~r~2/3 Warnings!", 6000, 1);
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 1);
SetPlayerScore(playerid, -10);
SetPlayerPos(playerid, 1551.7120, -1675.3322, 15.9687);
SetPlayerFacingAngle(playerid, 91.0272);
SetPlayerSkin(playerid, 137);
}
if(TeamKills[killerid] == 3)
{
GameTextForPlayer(playerid, "~y~Teamkill ~r~not allowed!~n~~r~3/3 Warnings!", 6000, 1);
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 1);
SetPlayerScore(playerid, -10);
SetPlayerPos(playerid, 1551.7120, -1675.3322, 15.9687);
SetPlayerFacingAngle(playerid, 91.0272);
SetPlayerSkin(playerid, 137);
new
name[MAX_PLAYER_NAME];
string[256];
GetPlayerName(pID,name,sizeof(name));
format(string,sizeof(string),"[AUTO-KICK] has kicked %s with Reason: Teamkill"name);
SendClientMessageToAll(ROT,string);
Kick(pID);
return 1;
}
}
}
//edit: ²!
MFG.