if(strcmp(cmd, "/cuff", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gTeam[playerid] == 2 || IsACop(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE, "FEHLER: /cuff [playerid]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(gTeam[giveplayerid] == 2 || IsACop(giveplayerid))
{
SendClientMessage(playerid, COLOR_GREY, "Du kannst keine Polizisten cuffen!");
return 1;
}
if(PlayerCuffed[giveplayerid] > 0)
{
SendClientMessage(playerid, COLOR_GREY, "Spieler ist schon gecufft!");
return 1;
}
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
if(giveplayerid == playerid)
{
SendClientMessage(playerid, COLOR_GREY, "Du kannst dich nicht selber fesseln!");
return 1;
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Officer %s hat dir Handschellen angelegt.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Du legst %s Handschellen an.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Officer %s hat %s Handschellen angelegt.", sendername,giveplayer,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GameTextForPlayer(giveplayerid, "~r~Festgenommen", 2500, 3);
SetPlayerSpecialAction(giveplayerid,SPECIAL_ACTION_CUFFED);
SetPlayerAttachedObject(giveplayerid, 0, 19418, 6, -0.011000, 0.028000,
-0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000,
1.168000);
FreezePlayer(giveplayerid);
KillTimer(hacken[giveplayerid]);
PlayerCuffed[giveplayerid] = 2;
PlayerCuffedTime[giveplayerid] = 180;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Der Spieler ist nicht in deiner nähe !");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Dieser Spieler ist Offline !");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Du bist kein Polizist !");
}
}
return 1;
}
Bitte, kannst du deine Frage bitte nochmal ORDENTLICH stellen?
So das man was versteht