SHOW:
|
|
- or go back to the newest paste.
1 | ganz oben | |
2 | #define DIALOG_Buslinien 9734 | |
3 | new L1Checkpoint[MAX_PLAYERS]; | |
4 | new L2Checkpoint[MAX_PLAYERS]; | |
5 | ||
6 | ||
7 | ||
8 | OnPlayerEnterCheckpoint | |
9 | new jobcar = GetPlayerVehicleID(playerid); | |
10 | //-------------------------------------------- Busystem --------------------------------------------------- | |
11 | if(L1Checkpoint[playerid]==1) | |
12 | { | |
13 | if(GetVehicleModel(jobcar) == 431 || GetVehicleModel(jobcar) == 437 &&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)) | |
14 | { | |
15 | SetPlayerCheckpoint(playerid,776.9352,-1042.2952,24.2814,6.0); | |
16 | ProxDetector(5.0, playerid, "Nächster Halt: LS Friedhof", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE); | |
17 | TogglePlayerControllable(playerid,0); | |
18 | SetTimerEx("HaltestelleTimer",6000,0,"i",playerid); | |
19 | L1Checkpoint[playerid]=2; | |
20 | } | |
21 | else | |
22 | { | |
23 | SendClientMessage(playerid,COLOR_RED,"Sie sind in keinem Bus."); | |
24 | } | |
25 | } | |
26 | else if(L1Checkpoint[playerid]==2) | |
27 | { | |
28 | if(GetVehicleModel(jobcar) == 431 || GetVehicleModel(jobcar) == 437 &&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)) | |
29 | { | |
30 | SetPlayerCheckpoint(playerid,623.6121,-1254.5010,17.6575,6.0); | |
31 | TogglePlayerControllable(playerid,0); | |
32 | SetTimerEx("HaltestelleTimer",6000,0,"i",playerid); | |
33 | ProxDetector(5.0, playerid, "Nächster Halt: LCN HQ", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE); | |
34 | L1Checkpoint[playerid]=3; | |
35 | } | |
36 | else | |
37 | { | |
38 | SendClientMessage(playerid,COLOR_RED,"Sie sind in keinem Bus."); | |
39 | } | |
40 | } | |
41 | else if(L1Checkpoint[playerid]==3) | |
42 | { | |
43 | if(GetVehicleModel(jobcar) == 431 || GetVehicleModel(jobcar) == 437 &&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)) | |
44 | { | |
45 | SetPlayerCheckpoint(playerid,505.9393,-1414.6676,16.0744,6.0); | |
46 | ProxDetector(5.0, playerid, "Nächster Halt: Noobspawn", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE); | |
47 | TogglePlayerControllable(playerid,0); | |
48 | SetTimerEx("HaltestelleTimer",6000,0,"i",playerid); | |
49 | L1Checkpoint[playerid]=4; | |
50 | } | |
51 | else | |
52 | { | |
53 | SendClientMessage(playerid,COLOR_RED,"Sie sind in keinem Bus."); | |
54 | } | |
55 | } | |
56 | else if(L1Checkpoint[playerid]==4) | |
57 | { | |
58 | if(GetVehicleModel(jobcar) == 431 || GetVehicleModel(jobcar) == 437 &&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)) | |
59 | { | |
60 | SetPlayerCheckpoint(playerid,394.2750,-1654.1613,31.1475,6.0); | |
61 | ProxDetector(5.0, playerid, "Nächster Halt: Angelsteg", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE); | |
62 | TogglePlayerControllable(playerid,0); | |
63 | SetTimerEx("HaltestelleTimer",6000,0,"i",playerid); | |
64 | L1Checkpoint[playerid]=5; | |
65 | } | |
66 | else | |
67 | { | |
68 | SendClientMessage(playerid,COLOR_RED,"Sie sind in keinem Bus."); | |
69 | } | |
70 | } | |
71 | else if(L1Checkpoint[playerid]==5) | |
72 | { | |
73 | SetPlayerCheckpoint(playerid,1033.9972,-1615.7546,13.4760,6.0); | |
74 | ProxDetector(5.0, playerid, "Nächster Halt: Jobcenter", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE); | |
75 | TogglePlayerControllable(playerid,0); | |
76 | SetTimerEx("HaltestelleTimer",6000,0,"i",playerid); | |
77 | L1Checkpoint[playerid]=6; | |
78 | } | |
79 | else if(L1Checkpoint[playerid]==6) | |
80 | { | |
81 | SetPlayerCheckpoint(playerid,1175.2574,-1855.5714,13.4916,6.0); | |
82 | ProxDetector(5.0, playerid, "Nächster Halt: Altes Busdepot", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE); | |
83 | TogglePlayerControllable(playerid,0); | |
84 | SetTimerEx("HaltestelleTimer",6000,0,"i",playerid); | |
85 | L1Checkpoint[playerid]=7; | |
86 | } | |
87 | else if(L1Checkpoint[playerid]==7) | |
88 | { | |
89 | SetPlayerCheckpoint(playerid,1481.6018,-1735.8101,13.4760,6.0); | |
90 | ProxDetector(5.0, playerid, "Nächster Halt: Stadthalle", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE); | |
91 | TogglePlayerControllable(playerid,0); | |
92 | SetTimerEx("HaltestelleTimer",6000,0,"i",playerid); | |
93 | L1Checkpoint[playerid]=8; | |
94 | } | |
95 | else if(L1Checkpoint[playerid]==8) | |
96 | { | |
97 | SetPlayerCheckpoint(playerid,1854.5161,-1755.6998,13.4761,6.0); | |
98 | ProxDetector(5.0, playerid, "Nächster Halt: Alhambra", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE); | |
99 | TogglePlayerControllable(playerid,0); | |
100 | SetTimerEx("HaltestelleTimer",6000,0,"i",playerid); | |
101 | L1Checkpoint[playerid]=9; | |
102 | } | |
103 | else if(L1Checkpoint[playerid]==9) | |
104 | { | |
105 | SetPlayerCheckpoint(playerid,1717.9143,-1356.6332,13.4759,6.0); | |
106 | ProxDetector(5.0, playerid, "Nächster Halt: LS Downtown", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE); | |
107 | TogglePlayerControllable(playerid,0); | |
108 | SetTimerEx("HaltestelleTimer",6000,0,"i",playerid); | |
109 | L1Checkpoint[playerid]=10; | |
110 | } | |
111 | else if(L1Checkpoint[playerid]==10) | |
112 | { | |
113 | SetPlayerCheckpoint(playerid,1461.2816,-1030.4275,23.7494,6.0); | |
114 | ProxDetector(5.0, playerid, "Nächster Halt: LS Bank", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE); | |
115 | TogglePlayerControllable(playerid,0); | |
116 | SetTimerEx("HaltestelleTimer",6000,0,"i",playerid); | |
117 | L1Checkpoint[playerid]=11; | |
118 | } | |
119 | else if(L1Checkpoint[playerid]==11) | |
120 | { | |
121 | SetPlayerCheckpoint(playerid,1181.5731,-936.9670,42.8555,6.0); | |
122 | ProxDetector(5.0, playerid, "Nächster Halt: BSN", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE); | |
123 | TogglePlayerControllable(playerid,0); | |
124 | SetTimerEx("HaltestelleTimer",6000,0,"i",playerid); | |
125 | L1Checkpoint[playerid]=12; | |
126 | } | |
127 | else if(L1Checkpoint[playerid]==12) | |
128 | { | |
129 | SendClientMessage(playerid,COLOR_LIGHTBLUE,"Sie haben diese Linie beendet und erhälten $6000."); | |
130 | ProxDetector(5.0, playerid, "Endstelle. Wir bitten alle Fahrgäste auszusteigen.", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE); | |
131 | PlayerInfo[playerid][pAccount]+=6000; | |
132 | DisablePlayerCheckpoint(playerid); | |
133 | L1Checkpoint[playerid]=0; | |
134 | } | |
135 | //LS Linie 2 | |
136 | //BSN | |
137 | if(L2Checkpoint[playerid]==1) | |
138 | { | |
139 | if(GetVehicleModel(jobcar) == 437 || GetVehicleModel(jobcar) == 431) | |
140 | { | |
141 | SetPlayerCheckpoint(playerid,794.0136,-1350.2284,13.1138,6.0); | |
142 | ProxDetector(5.0, playerid, "Nächster Halt: Market Station", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE); | |
143 | TogglePlayerControllable(playerid,0); | |
144 | SetTimerEx("HaltestelleTimer",6000,0,"i",playerid); | |
145 | - | L2Checkpoint[playerid]=2; |
145 | + | L2Checkpoint[playerid]=2; // Hier stopt er Quasi |
146 | } | |
147 | else | |
148 | { | |
149 | SendClientMessage(playerid,COLOR_RED,"Sie sind in keinem Bus."); | |
150 | } | |
151 | } | |
152 | - | else if(L2Checkpoint[playerid]==2) |
152 | + | else if(L2Checkpoint[playerid]==2) // der neue Checkpoint wird nicht erstellt es geht nicht weiter |
153 | { | |
154 | if(GetVehicleModel(jobcar) == 437 || GetVehicleModel(jobcar) == 431) | |
155 | { | |
156 | SetPlayerCheckpoint(playerid,1129.1219,-1409.4923,13.1807,6.0); | |
157 | ProxDetector(5.0, playerid, "Nächster Halt: LS-Krankenhaus", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE); | |
158 | L2Checkpoint[playerid]=3; | |
159 | TogglePlayerControllable(playerid,0); | |
160 | SetTimerEx("HaltestelleTimer",6000,0,"i",playerid); | |
161 | } | |
162 | else | |
163 | { | |
164 | SendClientMessage(playerid,COLOR_RED,"Sie sind in keinem Bus."); | |
165 | } | |
166 | } | |
167 | else if(L2Checkpoint[playerid]==3) | |
168 | { | |
169 | if(GetVehicleModel(jobcar) == 437 || GetVehicleModel(jobcar) == 431) | |
170 | { | |
171 | SetPlayerCheckpoint(playerid,1146.2118,-1619.3352,13.5083,6.0); | |
172 | ProxDetector(5.0, playerid, "Nächster Halt: Jobcenter", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE); | |
173 | L2Checkpoint[playerid]=4; | |
174 | TogglePlayerControllable(playerid,0); | |
175 | SetTimerEx("HaltestelleTimer",6000,0,"i",playerid); | |
176 | } | |
177 | else | |
178 | { | |
179 | SendClientMessage(playerid,COLOR_RED,"Sie sind in keinem Bus."); | |
180 | } | |
181 | } | |
182 | else if(L2Checkpoint[playerid]==4) | |
183 | { | |
184 | if(GetVehicleModel(jobcar) == 437 || GetVehicleModel(jobcar) == 431) | |
185 | { | |
186 | SetPlayerCheckpoint(playerid,1175.2574,-1855.5714,13.4916,6.0); | |
187 | ProxDetector(5.0, playerid, "Nächster Halt: Altes Busdepot", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE); | |
188 | L2Checkpoint[playerid]=5; | |
189 | TogglePlayerControllable(playerid,0); | |
190 | SetTimerEx("HaltestelleTimer",6000,0,"i",playerid); | |
191 | } | |
192 | else | |
193 | { | |
194 | SendClientMessage(playerid,COLOR_RED,"Sie sind in keinem Bus."); | |
195 | } | |
196 | } | |
197 | else if(L2Checkpoint[playerid]==5) | |
198 | { | |
199 | SetPlayerCheckpoint(playerid,1481.6018,-1735.8101,13.4760,6.0); | |
200 | ProxDetector(5.0, playerid, "Nächster Halt: Stadthalle", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE); | |
201 | L2Checkpoint[playerid]=6; | |
202 | TogglePlayerControllable(playerid,0); | |
203 | SetTimerEx("HaltestelleTimer",6000,0,"i",playerid); | |
204 | } | |
205 | else if(L2Checkpoint[playerid]==6) | |
206 | { | |
207 | SetPlayerCheckpoint(playerid,1817.8978,-1919.9874,13.1065,6.0); | |
208 | ProxDetector(5.0, playerid, "Nächster Halt: Taxidepot", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE); | |
209 | L2Checkpoint[playerid]=7; | |
210 | TogglePlayerControllable(playerid,0); | |
211 | SetTimerEx("HaltestelleTimer",6000,0,"i",playerid); | |
212 | } | |
213 | else if(L2Checkpoint[playerid]==7) | |
214 | { | |
215 | SetPlayerCheckpoint(playerid,1983.5197,-2170.0059,13.1067,6.0); | |
216 | ProxDetector(5.0, playerid, "Nächster Halt: LS-Flughafen", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE); | |
217 | L2Checkpoint[playerid]=8; | |
218 | TogglePlayerControllable(playerid,0); | |
219 | SetTimerEx("HaltestelleTimer",6000,0,"i",playerid); | |
220 | } | |
221 | else if(L2Checkpoint[playerid]==8) | |
222 | { | |
223 | SetPlayerCheckpoint(playerid,2253.0396,-2224.6731,13.0342,6.0); | |
224 | ProxDetector(5.0, playerid, "Nächster Halt: Waffenfabrik", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE); | |
225 | L2Checkpoint[playerid]=9; | |
226 | TogglePlayerControllable(playerid,0); | |
227 | SetTimerEx("HaltestelleTimer",6000,0,"i",playerid); | |
228 | } | |
229 | else if(L2Checkpoint[playerid]==9) | |
230 | { | |
231 | SetPlayerCheckpoint(playerid,1431.9406,-2286.9824,13.1099,6.0); | |
232 | ProxDetector(5.0, playerid, "Nächster Halt: LS Flughafen Ostseite", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE); | |
233 | L2Checkpoint[playerid]=10; | |
234 | TogglePlayerControllable(playerid,0); | |
235 | SetTimerEx("HaltestelleTimer",6000,0,"i",playerid); | |
236 | } | |
237 | else if(L2Checkpoint[playerid]==10) | |
238 | { | |
239 | SetPlayerCheckpoint(playerid,1431.8497,-939.5906,35.8273,6.0); | |
240 | ProxDetector(5.0, playerid, "Nächster Halt: LS Autobahnkreuz", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE); | |
241 | L2Checkpoint[playerid]=11; | |
242 | TogglePlayerControllable(playerid,0); | |
243 | SetTimerEx("HaltestelleTimer",6000,0,"i",playerid); | |
244 | } | |
245 | else if(L2Checkpoint[playerid]==11) | |
246 | { | |
247 | SetPlayerCheckpoint(playerid,1181.5731,-936.9670,42.8555,6.0); | |
248 | ProxDetector(5.0, playerid, "Nächster Halt: BSN", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE); | |
249 | L2Checkpoint[playerid]=12; | |
250 | TogglePlayerControllable(playerid,0); | |
251 | SetTimerEx("HaltestelleTimer",6000,0,"i",playerid); | |
252 | } | |
253 | else if(L2Checkpoint[playerid]==12) | |
254 | { | |
255 | SendClientMessage(playerid,COLOR_LIGHTBLUE,"Sie haben diese Linie beendet und erhälten $7000."); | |
256 | ProxDetector(5.0, playerid, "Endstelle. Wir bitten alle Fahrgäste auszusteigen.", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE); | |
257 | PlayerInfo[playerid][pAccount]+=7000; | |
258 | DisablePlayerCheckpoint(playerid); | |
259 | L2Checkpoint[playerid]=0; | |
260 | } | |
261 | ||
262 | ||
263 | ON PLAYER COMMAND TEXT | |
264 | ||
265 | if(strcmp(cmdtext,"/linie", true) == 0) | |
266 | { | |
267 | if(PlayerInfo[playerid][pJob] == 14) | |
268 | { | |
269 | new tmpcar = GetPlayerVehicleID(playerid); | |
270 | if(GetVehicleModel(tmpcar) == 431 || GetVehicleModel(tmpcar) == 437 &&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)) | |
271 | { | |
272 | ShowPlayerDialog(playerid,DIALOG_Buslinien,DIALOG_STYLE_LIST,"Buslinien","LS-Stadtlinie 1\nLS-Stadtlinie 2\nSchließen","Wählen",""); | |
273 | return 1; | |
274 | } | |
275 | else | |
276 | { | |
277 | SendClientMessage(playerid,COLOR_RED,"Sie müssen in einem Bus sein."); | |
278 | } | |
279 | } | |
280 | } | |
281 | ||
282 | ||
283 | On dialog response | |
284 | ||
285 | if(dialogid == DIALOG_Buslinien) | |
286 | { | |
287 | if(response) | |
288 | { | |
289 | if(listitem == 0) | |
290 | { | |
291 | SendClientMessage(playerid,COLOR_GREEN,"Buslinie gestartet. Fahren sie die roten Marker entlang."); | |
292 | PlayerInfo[playerid][Haltestelle]=0; | |
293 | SetPlayerCheckpoint(playerid,1181.5731,-936.9670,42.8555,6.0); | |
294 | L1Checkpoint[playerid]=1; | |
295 | } | |
296 | if(listitem == 1) | |
297 | { | |
298 | SendClientMessage(playerid,COLOR_GREEN,"Buslinie gestartet. Fahren sie die roten Marker entlang."); | |
299 | PlayerInfo[playerid][Haltestelle2]=1; | |
300 | L2Checkpoint[playerid]=1; | |
301 | SetPlayerCheckpoint(playerid,1181.5731,-936.9670,42.8555,6.0); | |
302 | } | |
303 | } | |
304 | } | |
305 | ||
306 | forward HaltestelleTimer(playerid); | |
307 | public HaltestelleTimer(playerid) | |
308 | { | |
309 | TogglePlayerControllable(playerid,1); | |
310 | } |