Was ist daran falsch?
if(newkeys & KEY_FIRE)
{
if(GEDRUECKT(KEY_FIRE) && ValideWaffe(playerid)) {
if(!HAT_GESCHOSSEN(playerid)) {
SETZE_GESCHOSSEN(playerid);
SetTimerEx("Headshot_AntiSpam", 1000, false, "d", playerid);
Headshot_ErmittleZielperson(playerid);
}
if(FotoCP[playerid] == 4)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid,2467.6118,-1350.9265,25.3558,2.5);
FotoCP[playerid] = 5;
}
if(FotoCP[playerid] == 7)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid,2243.3359,-2457.2031,13.2801,2.5);
FotoCP[playerid] = 8;
}
if(IsACop(playerid))
{
new issuerid = GetClosestPlayer(playerid);
if(GetDistanceBetweenPlayers(playerid,issuerid) < 2)
{
if(GetPVarInt(playerid, "Tazer") == 0) return 1;
if(IsPlayerConnected(issuerid))
if(IsPlayerInAnyVehicle(playerid)) return 1;
if(IsPlayerInAnyVehicle(issuerid)) return 1;
if(tazerzeit[playerid] == 1) return 1;
new giveplayer[MAX_PLAYER_NAME];
new sendername[MAX_PLAYER_NAME];
new string[128];
new Float: pX, Float:pY, Float:pZ;
GetPlayerPos(issuerid, pX, pY, pZ);
GetPlayerName(issuerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s hat dich mit seinem Tazer niedergestreckt. Du bist für 20 Sekunden Gelähmt.", sendername);
SendClientMessage(issuerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Du hast %s mit deinem Tazer niedergestreckt.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s nimmt seinen Tazer und streckt %s nieder.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GameTextForPlayer(issuerid, "~r~Geschockt", 2500, 3);
ApplyAnimation(issuerid, "CRACK","crckdeth1", 4.0, 0, 1, 1, 1, 0, 1);//crack Animation
TogglePlayerControllable(issuerid, 0);
SetPVarInt(issuerid, "Tazed", 1);
tazerzeit[playerid]=1;
SetTimerEx("tazertime",20000,0,"i",playerid);
SetTimerEx("untaze",20000,0,"i",issuerid);
}
}
}