So habe es mal so gemacht wie sharive125 habe nun aber ein Warning, womit ich nix anfangen kann
if(strcmp(cmdtext, "/hack", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new tmpcar = !IsACopCar(playerid);
if(IsPlayerInVehicle(playerid,tmpcar))
{
new string[126];
format(string, sizeof(string), "~r~Hackvorgang Gestartet Dauer 1 Minuten!");
GameTextForPlayer(playerid, string, 5000, 3);
TogglePlayerControllable(playerid, 0);
SetTimer("HACK", 60000, 0);
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Du bist in keinem Polizei/FBI Fahrzeug!");
}
return 1;
}
C:\Users\user\Bannlisten\Bannlisten\Serverscript\DreamReallife.pwn(15711) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Warning.
IsACopcar
public IsACopCar(carid)
{
for(new i = 0; i < sizeof(PolizeiVehs); i++)
{
if(carid == PolizeiVehs[i])
{
return 1;
}
}
return 0;