ne ich meine es ganz anders und zwar so
if(strcmp(cmd, "/einsperren", true) == 0 || strcmp(cmd, "/arrest", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gTeam[playerid] == 2 || IsACop(playerid))
{
if(OnDuty[playerid] != 1 && PlayerInfo[playerid][pMember] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " Du bist nicht im Dienst!");
return 1;
}
if(!PlayerToPoint(6.0, playerid, 268.3327,77.8972,1001.0391))
{// Jail spot
SendClientMessage(playerid, COLOR_GREY, " Du bist nicht nahe das Knastes !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /arrest [price] [time (minutes)] [bail (0=no 1=yes)] [bailprice]");
return 1;
}
moneys = strval(tmp);
if(moneys < 1 || moneys > 99999) { SendClientMessage(playerid, COLOR_GREY, " Knastpreis geht nur 1-99999 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /arrest [price] [time (minutes)] [bail (0=no 1=yes)] [bailprice]");
return 1;
}
new time = strval(tmp);
if(time < 1 || time > 60) { SendClientMessage(playerid, COLOR_GREY, " Jail Time Minutes can't be below 1 or above 20 (Take the person to prison then) !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /arrest [price] [time (minutes)] [bail (0=no 1=yes)] [bailprice]");
return 1;
}
new bail = strval(tmp);
if(bail < 0 || bail > 1) { SendClientMessage(playerid, COLOR_GREY, " Jail Bailing can't be below 0 or above 1 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /arrest [price] [time (minutes)] [bail (0=no 1=yes)] [bailprice]");
return 1;
}
new bailprice = strval(tmp);
if(bailprice < 0 || bailprice > 3000000) { SendClientMessage(playerid, COLOR_GREY, " Jail Bailing can't be below $0 or above $3000000 !"); return 1; }
new suspect = GetClosestPlayer(playerid);
if(IsPlayerConnected(suspect))
{
if(GetDistanceBetweenPlayers(playerid,suspect) < 5)
{
GetPlayerName(suspect, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(WantedLevel[suspect] < 1)
{
SendClientMessage(playerid, COLOR_GREY, " Spieler muss mindestens Wanted Level 1 haben !");
return 1;
}
format(string, sizeof(string), "* Du hast %s eingesperrt !", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
PlayerMoney[suspect] -= moneys;
format(string, sizeof(string), "eingesperrt von %s ~n~ für $%d", sendername, moneys);
GameTextForPlayer(suspect, string, 5000, 5);
ResetPlayerWeapons(suspect);
if(PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pLeader]==1)
{
format(string, sizeof(string), "<< Polizist %s hat %s eingesperrt! >>", sendername, giveplayer);
OOCNews(COLOR_LIGHTRED, string);
}
else if(PlayerInfo[playerid][pMember]==2||PlayerInfo[playerid][pLeader]==2)
{
format(string, sizeof(string), "<< Geheimdienst Mitarbeiter %s hat %s eingesperrt! >>", sendername, giveplayer);
OOCNews(COLOR_LIGHTRED, string);
}
else if(PlayerInfo[playerid][pMember]==3||PlayerInfo[playerid][pLeader]==3)
{
format(string, sizeof(string), "<< Soldat %s hat %s eingesperrt! >>", sendername, giveplayer);
OOCNews(COLOR_LIGHTRED, string);
}
SetPlayerInterior(suspect, 6);
SetPlayerPos(suspect,264.1305,77.6150,1001.0391);
PlayerInfo[suspect][pJailTime] = time * 60;
if(bail == 1)
{
JailPrice[suspect] = bailprice;
format(string, sizeof(string), "Du bist für %d sekunden im Knast. Kaution: $%d", PlayerInfo[suspect][pJailTime], JailPrice[suspect]);
SendClientMessage(suspect, COLOR_LIGHTBLUE, string);
}
else
{
JailPrice[suspect] = 0;
format(string, sizeof(string), "Du bist für %d sekunden im Knast. Kaution: Keine", PlayerInfo[suspect][pJailTime]);
SendClientMessage(suspect, COLOR_LIGHTBLUE, string);
}
PlayerInfo[suspect][pJailed] = 1;
PlayerInfo[suspect][pArrested] += 1;
SetPlayerFree(suspect,playerid, "VERHAFTET");
WantedPoints[suspect] = 0;
WantedLevel[suspect] = 0;
WantLawyer[suspect] = 1;
}//distance
}//not connected
else
{
SendClientMessage(playerid, COLOR_GREY, " Nicht nah genug um ihn einzusperren.");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Du bist keine Staatsbehörde !");
return 1;
}
}//not connected
return 1;
}
Den Command habe ich ja schon einmal für normal einsperren jetzt will ich den 2 mal rein tuhen und zwar so das ich es aussem auto machen kann und ich muss wissen wo ich die coords ändern muss für das von wo mann einsperrt in meinem fall die pd garage mehr möchte ich nicht nur ienen kleinen codschnipzel den du mir dan wieder schickst mit makierten punkten und das man aus dem auto jemanden einsperren kann