if(strcmp(cmd, "/prison", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /prison [Spieler ID / Name] [Zeit in Minuten]");
return 1;
}
new playa;
new money;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
if(playa == playerid)
{
SendClientMessage(playerid, COLOR_GRAD1, "Du kannst nicht dich selber einsperren!");
return 1;
}
if(PlayerInfo[playerid][pAdmin] < PlayerInfo[playa][pAdmin])
{
SendClientMessage(playerid, COLOR_GRAD1, "Du kannst keinen höherrangigen Admin einsperren!");
return 1;
}
if (PlayerInfo[playerid][pAdmin] >= 2)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Du hast %s eingesperrt.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* Du wurdest von Admin %s in den Knast gesteckt.", sendername);
SendClientMessage(playa, COLOR_LIGHTRED, string);
ResetPlayerWeapons(playa);
WantedPoints[playa] = 0;
PlayerInfo[playa][pJailed] = 1;
PlayerInfo[playa][pJailTime] = money*60;
SetPlayerInterior(playa, 3);
SetPlayerPos(playa, 1022.0858,-5.1644,4.2630);
format(string, sizeof(string), "Du wurdest für %d Minuten eingesperrt. Kaution: Nein", money);
SendClientMessage(playa, COLOR_LIGHTBLUE, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Du darfst diesen Befehl nicht benutzen!");
}
}
return 1;
}
Bitte