if(strcmp(cmd, "/ungrab", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsACop(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GREY, "Benutzung: /ungrab [Playerid/Name]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Du kannst dich nicht selbst freilassen!"); return 1; }
if(PlayerCuffed[giveplayerid])
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Du wurdest von %s freigelassen.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Du hast %s freigelassen.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s hat %s freigelassen.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GameTextForPlayer(giveplayerid, "~g~Freiheit", 2500, 3);
UnFreezePlayer(giveplayerid);
PlayerCuffed[giveplayerid] = 0;
//RemovePlayerFromVehicle(giveplayerid);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid,X,Y,Z);
SetPlayerPos(playerid,X,Y+1,Z);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Die Person hat keine Handschellen!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Der Spieler ist nicht nah genug bei dir!");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Der Spieler ist offline!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Du bist kein Polizist/Fbiler/Soldat/GSG!");
}
}
return 1;
}
Wenn ich den Befehl ausführen möchte werde ich, halt der jenige der den Befehl benutzt hat aus dem Auto geschmissen...
Woran liegt das?