Hey Leute hab das zwei Probleme die ich nicht beheben kann, bzw wo ich nicht ganz verstehe was ich tun muss.
Bezieht sich auf das EER Script von Midomen, welche gesperrt ist. Link Hier.
Das erste wäre, das beim Tanken sich die Timer nicht killen lassen und irgend eine ID dann meist die Meldung bekommt "Sie können nicht mehr Tanken" Hier die Auszüge aus dem Script.
if(dialogid == DIALOG_SPRIT)
{
if(response)
{
if(listitem == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][ptankart] == 2)
{
timer1 = SetTimerEx("BENZIN",2000,true,"i",playerid);
TogglePlayerControllable(playerid,0);
Refueling[playerid] = 1;
ShowPlayerDialog(playerid,DIALOG_TANKENABBRECHEN,DIALOG_STYLE_MSGBOX,"Tank Menü","Um mit dem Tanken aufzuhören Brechen sie ab","Abbrechen","Abbrechen");
}
else
{
SendClientMessage(playerid,rot,"Ihre Tankart ist nicht Benzin!");
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"Sie befinden sich in keinem Fahrzeug.");
}
}
if(listitem == 1)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][ptankart] == 1)
{
timer2 = SetTimerEx("DIESEL",2000,true,"i",playerid);
TogglePlayerControllable(playerid,0);
Refueling[playerid] = 2;
ShowPlayerDialog(playerid,DIALOG_TANKENABBRECHEN,DIALOG_STYLE_MSGBOX,"Tank Menü","Um mit dem Tanken aufzuhören Brechen sie ab","Abbrechen","Abbrechen");
}
else
{
SendClientMessage(playerid,rot,"Ihre Tankart ist nicht Diesel!");
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"Sie befinden sich in keinem Fahrzeug.");
}
}
if(listitem == 2)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][ptankart] == 3)
{
timer3 = SetTimerEx("BIOGAS",2000,true,"i",playerid);
TogglePlayerControllable(playerid,0);
Refueling[playerid] = 3;
ShowPlayerDialog(playerid,DIALOG_TANKENABBRECHEN,DIALOG_STYLE_MSGBOX,"Tank Menü","Um mit dem Tanken aufzuhören Brechen sie ab","Abbrechen","Abbrechen");
}
else
{
SendClientMessage(playerid,rot,"Ihre Tankart ist nicht Biogas!");
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"Sie befinden sich in keinem Fahrzeug.");
}
}
if(listitem == 3)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][ptankart] == 4)
{
timer4 = SetTimerEx("KEROSIN",2000,true,"i",playerid);
TogglePlayerControllable(playerid,0);
Refueling[playerid] = 4;
ShowPlayerDialog(playerid,DIALOG_TANKENABBRECHEN,DIALOG_STYLE_MSGBOX,"Tank Menü","Um mit dem Tanken aufzuhören Brechen sie ab","Abbrechen","Abbrechen");
}
else
{
SendClientMessage(playerid,rot,"Ihre Tankart ist nicht Kerosin!");
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"Sie befinden sich in keinem Fahrzeug.");
}
}
}
}
{
if(response)
{
if(listitem == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][ptankart] == 2)
{
timer1 = SetTimerEx("BENZIN",2000,true,"i",playerid);
TogglePlayerControllable(playerid,0);
Refueling[playerid] = 1;
ShowPlayerDialog(playerid,DIALOG_TANKENABBRECHEN,DIALOG_STYLE_MSGBOX,"Tank Menü","Um mit dem Tanken aufzuhören Brechen sie ab","Abbrechen","Abbrechen");
}
else
{
SendClientMessage(playerid,rot,"Ihre Tankart ist nicht Benzin!");
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"Sie befinden sich in keinem Fahrzeug.");
}
}
if(listitem == 1)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][ptankart] == 1)
{
timer2 = SetTimerEx("DIESEL",2000,true,"i",playerid);
TogglePlayerControllable(playerid,0);
Refueling[playerid] = 2;
ShowPlayerDialog(playerid,DIALOG_TANKENABBRECHEN,DIALOG_STYLE_MSGBOX,"Tank Menü","Um mit dem Tanken aufzuhören Brechen sie ab","Abbrechen","Abbrechen");
}
else
{
SendClientMessage(playerid,rot,"Ihre Tankart ist nicht Diesel!");
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"Sie befinden sich in keinem Fahrzeug.");
}
}
if(listitem == 2)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][ptankart] == 3)
{
timer3 = SetTimerEx("BIOGAS",2000,true,"i",playerid);
TogglePlayerControllable(playerid,0);
Refueling[playerid] = 3;
ShowPlayerDialog(playerid,DIALOG_TANKENABBRECHEN,DIALOG_STYLE_MSGBOX,"Tank Menü","Um mit dem Tanken aufzuhören Brechen sie ab","Abbrechen","Abbrechen");
}
else
{
SendClientMessage(playerid,rot,"Ihre Tankart ist nicht Biogas!");
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"Sie befinden sich in keinem Fahrzeug.");
}
}
if(listitem == 3)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][ptankart] == 4)
{
timer4 = SetTimerEx("KEROSIN",2000,true,"i",playerid);
TogglePlayerControllable(playerid,0);
Refueling[playerid] = 4;
ShowPlayerDialog(playerid,DIALOG_TANKENABBRECHEN,DIALOG_STYLE_MSGBOX,"Tank Menü","Um mit dem Tanken aufzuhören Brechen sie ab","Abbrechen","Abbrechen");
}
else
{
SendClientMessage(playerid,rot,"Ihre Tankart ist nicht Kerosin!");
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"Sie befinden sich in keinem Fahrzeug.");
}
}
}
}
forward BENZIN(playerid);
public BENZIN(playerid)
{
new VID;
new FillUp;
new Preis;
VID = GetPlayerVehicleID(playerid);
FillUp = 1;
Preis = FillUp * SPRITPREIS_BENZIN;
if(Gas[VID] < GetGasMax(GetVehicleModel(VID)))
{
if(Refueling[playerid] == 1)
{
if(GetPlayerMoney(playerid) >=Preis)
{
if(IsPlayerInRangeOfPoint(playerid,10.0,1938.0444,-1774.1871,13.3828))
{
SBizzInfo[2][sbTill] += Preis;
}
else if(IsPlayerInRangeOfPoint(playerid,10.0,1004.0070,-939.3102,42.1797))
{
SBizzInfo[3][sbTill] += Preis;
}
else if(IsPlayerInRangeOfPoint(playerid,10.0,778.2385,-2270.1257,13.3807))
{
SBizzInfo[4][sbTill] += Preis;
}
else if(IsPlayerInRangeOfPoint(playerid,10.0,-90.5515,-1169.4578,2.4079))
{
SBizzInfo[5][sbTill] += Preis;
}
GivePlayerMoney(playerid,-Preis);
Gas[VID]+=1;
}
}
}
else
{
SendClientMessage(playerid,rot,"Sie können nicht mehr Tanken");
KillTimer(timer1);
UnFreezePlayer(playerid);
}
}
forward DIESEL(playerid);
public DIESEL(playerid)
{
new VID;
new FillUp;
new Preis;
VID = GetPlayerVehicleID(playerid);
FillUp = 1;
Preis = FillUp * SPRITPREIS_DIESEL;
if(Gas[VID] < GetGasMax(GetVehicleModel(VID)))
{
if(Refueling[playerid] == 2)
{
if(GetPlayerMoney(playerid) >=Preis)
{
if(IsPlayerInRangeOfPoint(playerid,10.0,1938.0444,-1774.1871,13.3828))
{
SBizzInfo[2][sbTill] += Preis;
}
else if(IsPlayerInRangeOfPoint(playerid,10.0,1004.0070,-939.3102,42.1797))
{
SBizzInfo[3][sbTill] += Preis;
}
else if(IsPlayerInRangeOfPoint(playerid,10.0,778.2385,-2270.1257,13.3807))
{
SBizzInfo[4][sbTill] += Preis;
}
else if(IsPlayerInRangeOfPoint(playerid,10.0,-90.5515,-1169.4578,2.4079))
{
SBizzInfo[5][sbTill] += Preis;
}
GivePlayerMoney(playerid,-Preis);
Gas[VID]+=1;
}
}
}
else
{
SendClientMessage(playerid,rot,"Sie können nicht mehr Tanken");
KillTimer(timer2);
UnFreezePlayer(playerid);
}
}
forward BIOGAS(playerid);
public BIOGAS(playerid)
{
new VID;
new FillUp;
new Preis;
VID = GetPlayerVehicleID(playerid);
FillUp = 1;
Preis = FillUp * SPRITPREIS_BIOGAS;
if(Gas[VID] < GetGasMax(GetVehicleModel(VID)))
{
if(Refueling[playerid] == 3)
{
if(GetPlayerMoney(playerid) >=Preis)
{
if(IsPlayerInRangeOfPoint(playerid,10.0,1938.0444,-1774.1871,13.3828))
{
SBizzInfo[2][sbTill] += Preis;
}
else if(IsPlayerInRangeOfPoint(playerid,10.0,1004.0070,-939.3102,42.1797))
{
SBizzInfo[3][sbTill] += Preis;
}
else if(IsPlayerInRangeOfPoint(playerid,10.0,778.2385,-2270.1257,13.3807))
{
SBizzInfo[4][sbTill] += Preis;
}
else if(IsPlayerInRangeOfPoint(playerid,10.0,-90.5515,-1169.4578,2.4079))
{
SBizzInfo[5][sbTill] += Preis;
}
GivePlayerMoney(playerid,-Preis);
Gas[VID]+=1;
}
}
}
else
{
SendClientMessage(playerid,rot,"Sie können nicht mehr Tanken");
KillTimer(timer3);
UnFreezePlayer(playerid);
}
}
forward KEROSIN(playerid);
public KEROSIN(playerid)
{
new VID;
new FillUp;
new Preis;
VID = GetPlayerVehicleID(playerid);
FillUp = 1;
Preis = FillUp * SPRITPREIS_KEROSIN;
if(Gas[VID] < GetGasMax(GetVehicleModel(VID)))
{
if(Refueling[playerid] == 4)
{
if(GetPlayerMoney(playerid) >=Preis)
{
if(IsPlayerInRangeOfPoint(playerid,10.0,1938.0444,-1774.1871,13.3828))
{
SBizzInfo[2][sbTill] += Preis;
}
else if(IsPlayerInRangeOfPoint(playerid,10.0,1004.0070,-939.3102,42.1797))
{
SBizzInfo[3][sbTill] += Preis;
}
else if(IsPlayerInRangeOfPoint(playerid,10.0,778.2385,-2270.1257,13.3807))
{
SBizzInfo[4][sbTill] += Preis;
}
else if(IsPlayerInRangeOfPoint(playerid,10.0,-90.5515,-1169.4578,2.4079))
{
SBizzInfo[5][sbTill] += Preis;
}
GivePlayerMoney(playerid,-Preis);
Gas[VID]+=1;
}
}
}
else
{
UnFreezePlayer(playerid);
SendClientMessage(playerid,rot,"Sie können nicht mehr Tanken");
KillTimer(timer4);
}
}
public BENZIN(playerid)
{
new VID;
new FillUp;
new Preis;
VID = GetPlayerVehicleID(playerid);
FillUp = 1;
Preis = FillUp * SPRITPREIS_BENZIN;
if(Gas[VID] < GetGasMax(GetVehicleModel(VID)))
{
if(Refueling[playerid] == 1)
{
if(GetPlayerMoney(playerid) >=Preis)
{
if(IsPlayerInRangeOfPoint(playerid,10.0,1938.0444,-1774.1871,13.3828))
{
SBizzInfo[2][sbTill] += Preis;
}
else if(IsPlayerInRangeOfPoint(playerid,10.0,1004.0070,-939.3102,42.1797))
{
SBizzInfo[3][sbTill] += Preis;
}
else if(IsPlayerInRangeOfPoint(playerid,10.0,778.2385,-2270.1257,13.3807))
{
SBizzInfo[4][sbTill] += Preis;
}
else if(IsPlayerInRangeOfPoint(playerid,10.0,-90.5515,-1169.4578,2.4079))
{
SBizzInfo[5][sbTill] += Preis;
}
GivePlayerMoney(playerid,-Preis);
Gas[VID]+=1;
}
}
}
else
{
SendClientMessage(playerid,rot,"Sie können nicht mehr Tanken");
KillTimer(timer1);
UnFreezePlayer(playerid);
}
}
forward DIESEL(playerid);
public DIESEL(playerid)
{
new VID;
new FillUp;
new Preis;
VID = GetPlayerVehicleID(playerid);
FillUp = 1;
Preis = FillUp * SPRITPREIS_DIESEL;
if(Gas[VID] < GetGasMax(GetVehicleModel(VID)))
{
if(Refueling[playerid] == 2)
{
if(GetPlayerMoney(playerid) >=Preis)
{
if(IsPlayerInRangeOfPoint(playerid,10.0,1938.0444,-1774.1871,13.3828))
{
SBizzInfo[2][sbTill] += Preis;
}
else if(IsPlayerInRangeOfPoint(playerid,10.0,1004.0070,-939.3102,42.1797))
{
SBizzInfo[3][sbTill] += Preis;
}
else if(IsPlayerInRangeOfPoint(playerid,10.0,778.2385,-2270.1257,13.3807))
{
SBizzInfo[4][sbTill] += Preis;
}
else if(IsPlayerInRangeOfPoint(playerid,10.0,-90.5515,-1169.4578,2.4079))
{
SBizzInfo[5][sbTill] += Preis;
}
GivePlayerMoney(playerid,-Preis);
Gas[VID]+=1;
}
}
}
else
{
SendClientMessage(playerid,rot,"Sie können nicht mehr Tanken");
KillTimer(timer2);
UnFreezePlayer(playerid);
}
}
forward BIOGAS(playerid);
public BIOGAS(playerid)
{
new VID;
new FillUp;
new Preis;
VID = GetPlayerVehicleID(playerid);
FillUp = 1;
Preis = FillUp * SPRITPREIS_BIOGAS;
if(Gas[VID] < GetGasMax(GetVehicleModel(VID)))
{
if(Refueling[playerid] == 3)
{
if(GetPlayerMoney(playerid) >=Preis)
{
if(IsPlayerInRangeOfPoint(playerid,10.0,1938.0444,-1774.1871,13.3828))
{
SBizzInfo[2][sbTill] += Preis;
}
else if(IsPlayerInRangeOfPoint(playerid,10.0,1004.0070,-939.3102,42.1797))
{
SBizzInfo[3][sbTill] += Preis;
}
else if(IsPlayerInRangeOfPoint(playerid,10.0,778.2385,-2270.1257,13.3807))
{
SBizzInfo[4][sbTill] += Preis;
}
else if(IsPlayerInRangeOfPoint(playerid,10.0,-90.5515,-1169.4578,2.4079))
{
SBizzInfo[5][sbTill] += Preis;
}
GivePlayerMoney(playerid,-Preis);
Gas[VID]+=1;
}
}
}
else
{
SendClientMessage(playerid,rot,"Sie können nicht mehr Tanken");
KillTimer(timer3);
UnFreezePlayer(playerid);
}
}
forward KEROSIN(playerid);
public KEROSIN(playerid)
{
new VID;
new FillUp;
new Preis;
VID = GetPlayerVehicleID(playerid);
FillUp = 1;
Preis = FillUp * SPRITPREIS_KEROSIN;
if(Gas[VID] < GetGasMax(GetVehicleModel(VID)))
{
if(Refueling[playerid] == 4)
{
if(GetPlayerMoney(playerid) >=Preis)
{
if(IsPlayerInRangeOfPoint(playerid,10.0,1938.0444,-1774.1871,13.3828))
{
SBizzInfo[2][sbTill] += Preis;
}
else if(IsPlayerInRangeOfPoint(playerid,10.0,1004.0070,-939.3102,42.1797))
{
SBizzInfo[3][sbTill] += Preis;
}
else if(IsPlayerInRangeOfPoint(playerid,10.0,778.2385,-2270.1257,13.3807))
{
SBizzInfo[4][sbTill] += Preis;
}
else if(IsPlayerInRangeOfPoint(playerid,10.0,-90.5515,-1169.4578,2.4079))
{
SBizzInfo[5][sbTill] += Preis;
}
GivePlayerMoney(playerid,-Preis);
Gas[VID]+=1;
}
}
}
else
{
UnFreezePlayer(playerid);
SendClientMessage(playerid,rot,"Sie können nicht mehr Tanken");
KillTimer(timer4);
}
}
Das ander Problem kommt nach dem hier.