Habe hier noch ein paar Probleme die schon lange existieren..
So als erstes ein Auto Kick System wenn jemand sein Teamkollege killt nach 3maligem Warnen.
//Kommt ein String Fehler! (Zeile: 66)
Hier ma der Code:
public OnPlayerDeath(playerid, killerid, reason)
{
new string[128],name[MAX_PLAYER_NAME];
GetPlayerName(killerid,name,sizeof(name));
SendDeathMessage(killerid, playerid, reason);
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
GivePlayerMoney(playerid, -300);
GivePlayerMoney(killerid, 1000);
DropPlayerWeapons(playerid);
killss[playerid] = 0;
killss[killerid] ++;
if(killss[killerid] == 3)
{
format(string,sizeof(string),"~g~%s~n~~y~Multikill!",name);
GameTextForAll(string,3000,6);
}
if(killss[killerid] == 4)
{
format(string,sizeof(string),"~g~%s~n~~b~Ultrakill!",name);
GameTextForAll(string,3000,6);
}
if(killss[killerid] == 5)
{
format(string,sizeof(string),"~g~%s~n~~p~Fantastickill!",name);
GameTextForAll(string,3000,6);
}
if(killss[killerid] == 6)
{
format(string,sizeof(string),"~g~%s~n~~r~Unbelievablekill!",name);
GameTextForAll(string,3000,6);
}
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);
}
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);
}
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);
new string [10];
format(string, sizeof string, "[AUTO-KICK] has kicked [%s] with Reason: Teamkill", name);
new string2[256];
format(string2,sizeof(string2),"%s",string);
SendClientMessageToAll(ROT,string);
Kick(playerid);
return 1;
}
}
}
return 1;
}
Sry lange nicht mehr dran was gemacht! Bin dankbar für jede Hilfe