Nene das ist richtig,
versuche es mal so:
if(strcmp(cmd, "/kidnap", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(!IsPlayerInAnyVehicle(playerid))return SendClientMessage(playerid,COLOR_RED,"Du sitzt in keinem Fahrzeug!");
if(IsAGang(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GREY, "__________________ KIDNAP __________________");
SendClientMessage(playerid, COLOR_GREY, "Befehl: /kidnap [Spieler ID] [0/1]");
SendClientMessage(playerid, COLOR_GREY, "Info: 0 = Hinten links, 1 = Hinten rechts!");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(PlayerInfo[giveplayerid][pLevel] <= 2)
{
SendClientMessage(playerid, COLOR_GRAD1, "Du kannst keine Level 1er / Level 2er kidnappen!");
return 1;
}
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != playerid)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GREY, "Befehl: /kidnap [Spieler ID] [0/1");
SendClientMessage(playerid, COLOR_GREY, "Info: 0 = Hinten links, 1 = Hinten rechts!");
return 1;
}
new sit = strval(tmp);
if(sit < 0 || sit > 1) { SendClientMessage(playerid, COLOR_GREY, "Es gibt nur die Sitzplätze 0 und 1!"); return 1; }
if(IsPlayerInAnyVehicle(giveplayerid)) { SendClientMessage(playerid, COLOR_GRAD1, "Die Zielperson befindet sich in einem Fahrzeug!"); return 1; }
if(GetDistanceBetweenPlayers(playerid, giveplayerid) < 8)
{
new Float:health;
GetPlayerHealth(giveplayerid, health);
if(health >= 50)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s hat es nicht geschafft %s zu entführen!", sendername, giveplayer);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
format(string, sizeof(string), "*Du konntest %s nicht kidnappen, er hat über 50 HP!", giveplayer);
SendClientMessage(playerid, COLOR_GRAD1, string);
return 1;
}
new car = GetPlayerVehicleID(playerid);
if(IsARoller(car) || IsABike(car) || IsANewbie(car))
{
SendClientMessage(playerid, COLOR_GRAD1, "Du kannst keinen auf einen Bike kidnappen!");
return 1;
}
if(sit == 1 && IsA2Turer(car) || sit == 0 && IsA2Turer(car))
{
SendClientMessage(playerid, COLOR_GRAD1, "Den sitzt gibt es bei diesem Car nicht!");
return 1;
}
if(IsPlayerInArea(giveplayerid,1436.625, -1764.764, 1611.556, -1618.698) || IsPlayerInArea(giveplayerid, 1691.416, -1677.914, 1759.867, -1583.168) || IsPlayerInArea(giveplayerid, 1159.018, -959.4252, 1292.118, -864.6794) || IsPlayerInArea(giveplayerid, 1181.835, -1417.363, 1269.301, -1283.14))
{
SendClientMessage(playerid, COLOR_GRAD1, "Opfer in einer NO DM Zone!");
return 1;
}
if(sit == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* Du wurdest von %s gekidnapped.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
PutPlayerInVehicle(giveplayerid, car, 2);
FreezePlayer(giveplayerid);
PlayerTied[giveplayerid] = 1;
format(string, sizeof(string), "* %s hat %s ins Auto gezerrt!", sendername ,giveplayer);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(sit == 1)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Du wurdest von %s gekidnapped.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
PutPlayerInVehicle(giveplayerid, car, 3);
FreezePlayer(giveplayerid);
PlayerTied[giveplayerid] = 1;
format(string, sizeof(string), "* %s hat %s ins Auto gezerrt!", sendername ,giveplayer);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Der Spieler ist nicht in deiner Nähe!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Du kannst dich selber nicht entführen!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Kein solcher Spieler online!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Nur Mafiosi und Gangmitglieder können kidnappen!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Du bist noch nicht eingeloggt!");
}
return 1;
}