Hay ich suche ein grap system für /grap id
er sollte dann hinten rechts im car sitzten befhel soll für fbi army und lspd sein danke
Hay ich suche ein grap system für /grap id
er sollte dann hinten rechts im car sitzten befhel soll für fbi army und lspd sein danke
if(strcmp(cmd, "/getincar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Benutze: /getincar [ID]");
return 1;
}
if(OnDuty[playerid] ==1)
{
new person = strval(tmp);
new playerVehicle = GetPlayerVehicleID(playerid);
if(IsPlayerConnected(person))
{
if(person != INVALID_PLAYER_ID)
{
if(GetDistanceBetweenPlayers(playerid,person) <= 4)
{
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_LILA, " Du kannst nur in Fahrzeugen grabben!");
return 1;
}
if(PlayerCuffed[person] != 1)
{
SendClientMessage(playerid, COLOR_LILA, " Spieler muss getazert sein!");
return 1;
}
if(IsPlayerInAnyVehicle(person))
{
SendClientMessage(playerid, COLOR_LILA, " Ziel ist in einem Auto!");
return 1;
}
if(person == playerid) { SendClientMessage(playerid, COLOR_LILA, "Du kannst dich nicht selbst grabben!"); return 1; }
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2)
{
GetPlayerName(person, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Du wurdest von %s ins Farzeug gezogen.", sendername);
SendClientMessage(person, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Du hast %s ins Fahrzeug gezogen.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s hat %s ins Fahrzeug gezogen", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GameTextForPlayer(giveplayerid, "~r~Festgenommen", 2500, 3);
PutPlayerInVehicle(person,playerVehicle,3);
FreezePlayer(person);
PlayerCuffed[person] = 2;
PlayerCuffedTime[person] = (120 + random(120));
}
else
{
SendClientMessage(playerid, COLOR_LILA, " Du fährst kein Auto!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_LILA, " Spieler ist nicht in deine Nähe!");
return 1;
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_LILA, " Du bist kein Cop / FBI / Soldat / Secrt Service!");
}
}
return 1;
}
//-----------------------------------------Grab----------------------------------
if(strcmp(cmd, "/grab", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Benutze: /grab [ID]");
return 1;
}
if(IsACop(playerid))
{
new person = strval(tmp);
new playerVehicle = GetPlayerVehicleID(playerid);
if(IsPlayerConnected(person))
{
if(person != INVALID_PLAYER_ID)
{
if(GetDistanceBetweenPlayers(playerid,person) <= 8)
{
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_GREY, " Du kannst nur in Fahrzeugen grabben!");
return 1;
}
if(PlayerCuffed[person] != 1)
{
SendClientMessage(playerid, COLOR_GREY, " Spieler muss getazert sein !");
return 1;
}
if(IsACop(person))
{
SendClientMessage(playerid, COLOR_GREY, " Du kannst keinen Cop / FBI / Soldaten grabben!");
return 1;
}
if(IsPlayerInAnyVehicle(person))
{
SendClientMessage(playerid, COLOR_GREY, " Ziel ist in einem Auto!");
return 1;
}
if(person == playerid) { SendClientMessage(playerid, COLOR_GREY, "Du kannst dich nicht selbst grabben!"); return 1; }
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2)
{
GetPlayerName(person, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Du wurdest von %s ins Farzeug gezogen.", sendername);
SendClientMessage(person, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Du hast %s ins Fahrzeug gezogen.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s hat %s ins Fahrzeug gezogen", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GameTextForPlayer(giveplayerid, "~r~Festgenommen", 2500, 3);
PutPlayerInVehicle(person,playerVehicle,3);
TogglePlayerControllable(person,0);
PlayerCuffed[person] = 2;
PlayerCuffedTime[person] = (120 + random(120));
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Du fährst kein Auto!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Spieler ist nicht in deine Nähe!");
return 1;
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Du bist kein Cop / FBI / Soldat / Secrt Service!");
}
}
return 1;
}