if(strcmp(cmd, "/hs", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gTeam[playerid] == 2 || IsACop(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Verwendung: /hs [id/name]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(gTeam[giveplayerid] == 2 || IsACop(giveplayerid))
{
SendClientMessage(playerid, COLOR_RED, "Du kannst einen Polizisten keine Handschellen anlegen!");
return 1;
}
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_RED, "Du kannst dir selber die Handschellen nicht anlegen!"); return 1; }
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Officer %s legt der Person %s Handschellen an.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GameTextForPlayer(giveplayerid, "~r~VERHAFTET", 2500, 3);
SendClientMessage(giveplayerid, COLOR_PURPLE, "Alles was Sie sagen kann und wird gegen Sie verwendet werden");
// 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);
TogglePlayerControllable(giveplayerid, 0);
PlayerCuffed[giveplayerid] = 2;
PlayerCuffedTime[giveplayerid] = 9999;
}
else
{
SendClientMessage(playerid, COLOR_RED, "Diese Person ist nicht in deiner Nähe!");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Es gibt keinen Spieler mit dieser ID!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "Du bist kein Polizist !");
}
}
return 1;
}
Hoffe mir kann einer helfen