Würde gerne einen cdm erstellen, (/zelle[id])
welcher den spieler wenn er gesucht wird und getazert is ins gefängnis wirft,
Der pc crascht wen ich es in .amx umwandeln will
dcmd(zelle,5,cmdtext);
{
return 0;
dcmd_zelle(playerid,params[]) {
if(!strlen(params)) {
return SendClientMessage(playerid,COLOR_RED,"USAGE: /zelle [playerid]");
}
new
pID=strval(params);
if(!IsPlayerConnected(pID)) {
return SendClientMessage(playerid,COLOR_RED,"Kein Spieler mit angegebener ID Online");
}
if(gTeam[playerid] == 2 || IsACop(playerid))
{
if(OnDuty[playerid] != 1 && PlayerInfo[playerid][pMember] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " You are not on Duty!");
return 1;
}
if(!PlayerCuffed[pID] = 1) // if(!PlayerToPoint(7.5, playerid, 264.1090,86.7718,1001.0391,154.1196))
{
SendClientMessage(playerid, COLOR_GREY, "du hast ihn nicht Getazert verwende /tazer!");
return 1;
}
if(WantedLevel[pID] = 0)
{
SendClientMessage(playerid, COLOR_GREY, "mindestens Wanted Level 1 !");
return 1;
}
new timejail = ((WantedLevel[pID] + WantedPoints[pID]) * 500);
new lohn = ((WantedLevel[pID] + WantedPoints[pID]) * 1500 + 1000);
ResetPlayerWeapons(pID);
SetPlayerInterior(pID, 6);
SetPlayerPos(pID,264.1090,86.7718,1001.0391,154.1196);
PlayerInfo[pID][pJailTime] = timejail
GivePlayerMoney(playerid, lohn);
format(string, sizeof(string), "Wegesperrt für %d Secunden!", PlayerInfo[pID][pJailTime]);
SendClientMessage(pID, COLOR_LIGHTBLUE, string);
PlayerInfo[pID][pJailed] = 1;
PlayerInfo[pID][pArrested] += 1;
SetPlayerFree(pID,playerid, "Got Arrested");
//WantedPoints[pID] = 0; //erst beim Freilassen
//WantedLevel[pIDt] = 0; //erst beim Freilassen
WantLawyer[pID] = 1;
return 1;
}
}
}
return 1;
}