Hallo, ich habe eine Kleine Mautstation gescriptet. Sie ist an LV an der Autobahn.
Fügt dies Unter den Includes ein:
new Maut1;
new Maut2;
new Maut3;
new Maut4;
new Maut5;
new MautStation1;
forward MautTorTimer1();
Dies Unter GameModeInit
Maut1 = CreateObject(986,2115.39,879.029,7.24,0.0,0.0,270.0);
Maut2 = CreateObject(986,2115.39,871.129,7.24,0.0,0.0,270.0);
Maut3 = CreateObject(986,2115.39,863.229,7.24,0.0,0.0,270.0);
Maut4 = CreateObject(986,2115.39,855.229,7.24,0.0,0.0,270.0); //Das muss bewegt werden
Maut5 = CreateObject(986,2122.41,846.553,7.24,0.0,0.0,270.0);
MautStation1 = CreateObject(5837,2117.53,848.988,7.33973,0.0,0.0,180.0);
Dies Unter OnPlayerCommandText
if(strcmp,"/auf",true)==0)
{
if(IsPlayerInRangeOfPoint(playerid,10,2115.39,855.229,7.24))
{
GivePlayerMoney(playerid,-5);
SendClientMessage(playerid,0xA1FF00FF,"5$ bezahlt, viel Spaß bei der Weiterfahrt");
MoveObject(Maut4,2115.39,855.229,0.0,3.5);
MoveObject(MautStation1,0.0,0.0,0.0,0.0);
MoveObject(Maut1,0.0,0.0,0.0,0.0);
MoveObject(Maut2,0.0,0.0,0.0,0.0);
MoveObject(Maut3,0.0,0.0,0.0,0.0);
MoveObject(Maut5,0.0,0.0,0.0,0.0);
SetTimer("MautTorTimer1",5000,0);
}
}
Dies ganz unten:
public MautTorTimer1()
{
MoveObject(Maut4,2115.39,855.229,7.24,2.5);
}
Hier gebt Nahe beim Tor was neben dem Häuschen "/auf" ein. Dann werden 5$ abgehoben, und dann öffnet sich das tor und nach 5 Sec. schliest es wieder.
Hier Screens:
PS: Falls ihr mehr Braucht, einfach bescheid sagen