Wie frage ich ab ob der Player auf einem Boot/Motorad/Car/Flugzeug/... ist ? also jetzt nich mit IsPlayerInAnyVehicle sonder jede Vehicle art einzeln
Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!
Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
-
-
-
und da soll ich jedes Fahrzeug einzeln abfragen ?
-
wieso was hast du denn vor ?
-
Ich denke mal er möchte ein Anti-Carsurfing Script machen. Ich suche mal eben was raus.
-
Was ist ein Anti-Carsurfing ? Nein ich will ein Führerschein etc machen mit Rollerschein/Flugschein/Motoradschein/;D
-
naja du müsstest nur ids filtern also für motorrad, flugzeuge, roller und den rest für autos botte un fahrzeuge halt
-
Ja das macht ganz schön viel arbeit das zu filter aber kann man das net irentwie anders machen ?
-
hier :puh:
forward IsACar(carid);
public IsACar(carid)
{
new modelid = GetVehicleModel(carid);
if(modelid == 400 || modelid == 401 || modelid == 402 || modelid == 404 || modelid == 405 || modelid == 409 || modelid == 410 || modelid == 411 || modelid == 412 || modelid == 413 || modelid == 414 || modelid == 415 || modelid == 416 || modelid == 418 || modelid == 419 || modelid == 420 || modelid == 421 || modelid == 422 || modelid == 423 || modelid == 424 || modelid == 426 || modelid == 427 || modelid == 428 || modelid == 429 || modelid == 434 || modelid == 436
|| modelid == 438 || modelid == 439 || modelid == 440 || modelid == 442 || modelid == 445 || modelid == 451 || modelid == 458 || modelid == 459 || modelid == 466 || modelid == 467 || modelid == 470 || modelid == 474 || modelid == 475 || modelid == 477 || modelid == 478 || modelid == 479 || modelid == 480 || modelid == 482 || modelid == 483 || modelid == 489 || modelid == 490 || modelid == 491 || modelid == 492 || modelid == 494 || modelid == 495 || modelid == 496
|| modelid == 498 || modelid == 499 || modelid == 500 || modelid == 502 || modelid == 503 || modelid == 504 || modelid == 505 || modelid == 506 || modelid == 507 || modelid == 508 || modelid == 516 || modelid == 517 || modelid == 518 || modelid == 525 || modelid == 526 || modelid == 527 || modelid == 528 || modelid == 529 || modelid == 531 || modelid == 532 || modelid == 533 || modelid == 534 || modelid == 535 || modelid == 536 || modelid == 540 || modelid == 541
|| modelid == 542 || modelid == 543 || modelid == 545 || modelid == 546 || modelid == 547 || modelid == 549 || modelid == 550 || modelid == 551 || modelid == 552 || modelid == 554 || modelid == 555 || modelid == 558 || modelid == 560 || modelid == 561 || modelid == 562 || modelid == 565 || modelid == 566 || modelid == 567 || modelid == 568 || modelid == 573 || modelid == 575 || modelid == 576 || modelid == 579 || modelid == 580
|| modelid == 582 || modelid == 585 || modelid == 587 || modelid == 588 || modelid == 589 || modelid == 596 || modelid == 597 || modelid == 598 || modelid == 599 || modelid == 600 || modelid == 601 || modelid == 602 || modelid == 603 || modelid == 604 || modelid == 605 || modelid == 609 || modelid == 408)
return 1;
return 0;
} -
Hier, das ist aus dem nützliche Codeschnipsel Thread.
(Post von Austrianer)// Methode die (true/1) zurückgibt wenn das Fahrzeug nur 2 Sitze hat
stock IsACar2Seats(vehicleid) {
switch (GetVehicleModel(vehicleid)) {
case 401,402,403,406,407,408,410,411,412,413,414,415,419,422,423,424,429,434,436,439,443,444,451,455,456,457,474,475,477,478,480,489,491,494,495,496,498,499,500,502,503,504,505,506,508,514,515,517,518,524,525,526,527,528,533,534,535,536,541,542,543,544,545,549,552,554,555,556,557,558,559,562,565,573,575,576,578,587,588,589,599,600,601,602,603,605,609: return 1;
}
return 0;
}// Methode die (true/1) zurückgibt wenn es sich um ein fliegendes Fahrzeug handelt
stock IsAAirplane(vehicleid) {
switch (GetVehicleModel(vehicleid)) {
case 417, 425, 447, 460, 469, 476, 487, 488, 497, 511, 512, 513, 519, 520, 548, 553, 563, 577, 592, 593: return 1;
}
return 0;
}// Methode die (true/1) zurückgibt wenn es sich um ein Motorrad/Quad/GoKart handelt
stock IsABike(vehicleid) {
switch (GetVehicleModel(vehicleid)) {
case 448, 461, 462, 463, 468, 471, 481, 509, 510, 521, 522, 523, 568, 571, 581, 586: return 1;
}
return 0;
}// Methode die (true/1) zurückgibt wenn es sich um ein Boot handelt
stock IsABoat(vehicleid) {
switch (GetVehicleModel(vehicleid)) {
case 430, 446, 452, 453, 454, 472, 473, 484, 493, 595: return 1;
}
return 0;
} -
Hier mal meine Liste, die würde auch gut gehen:
stock IsACar(carid)
{
if(carid == 400 || carid == 401 || carid == 402 || carid == 404 || carid == 405 || carid == 406
|| carid == 407 || carid == 409 || carid == 410 || carid == 411 || carid == 412 || carid == 413
|| carid == 414 || carid == 415 || carid == 416 || carid == 418 || carid == 419 || carid == 420 || carid == 421
|| carid == 422 || carid == 423 || carid == 424 || carid == 426 || carid == 427 || carid == 428 || carid == 429
|| carid == 431 || carid == 432 || carid == 433 || carid == 434 || carid == 436 || carid == 437 || carid == 438
|| carid == 439 || carid == 440 || carid == 442 || carid == 445 || carid == 451 || carid == 458 || carid == 459 || carid == 466 || carid == 467 || carid == 470 || carid == 474
|| carid == 475 || carid == 477 || carid == 478 || carid == 479 || carid == 480 || carid == 482 || carid == 483
|| carid == 489 || carid == 490 || carid == 491 || carid == 492 || carid == 495 || carid == 496 || carid == 498
|| carid == 499 || carid == 500 || carid == 505 || carid == 506 || carid == 507 || carid == 508
|| carid == 516 || carid == 517 || carid == 518 || carid == 525 || carid == 526
|| carid == 527 || carid == 528 || carid == 529 || carid == 531 || carid == 532 || carid == 533 || carid == 534
|| carid == 535 || carid == 536 || carid == 540 || carid == 541 || carid == 542 || carid == 543 || carid == 544
|| carid == 545 || carid == 546 || carid == 547 || carid == 549 || carid == 550 || carid == 551 || carid == 552
|| carid == 554 || carid == 555 || carid == 558 || carid == 559 || carid == 560 || carid == 561 || carid == 562
|| carid == 565 || carid == 566 || carid == 567 || carid == 568 || carid == 575 || carid == 576 || carid == 579
|| carid == 580 || carid == 578 || carid == 582 || carid == 585 || carid == 587 || carid == 588 || carid == 589
|| carid == 596 || carid == 597 || carid == 598 || carid == 599 || carid == 600 || carid == 601 || carid == 602
|| carid == 603 || carid == 604 || carid == 605 || carid == 609)
{
return 1;
}
return 0;
}stock IsAPlane(carid)
{
if(carid == 592 || carid == 577 || carid == 511 || carid == 512 || carid == 593 || carid == 520
|| carid == 553 || carid == 476 || carid == 519 || carid == 460 || carid == 513 || carid == 548
|| carid == 425 || carid == 417 || carid == 487 || carid == 488 || carid == 497 || carid == 563
|| carid == 447 || carid == 469)
{
return 1;
}
return 0;
}stock IsABoat(carid)
{
if(carid == 472 || carid == 473 || carid == 493 || carid == 595 || carid == 484
|| carid == 430 || carid == 453 || carid == 452 || carid == 446 || carid == 454)
{
return 1;
}
return 0;
}stock IsATruck(carid)
{
if(carid == 435 || carid == 450 || carid == 584 || carid == 591 || carid == 578)return 1;
return 0;
}stock IsABike(carid)
{
if(carid == 581 || carid == 522 || carid == 521 || carid == 523 || carid == 586 || carid == 448 || carid == 461 || carid == 463 || carid == 468 || carid == 471)return 1;
return 0;
}stock IsAFahrrad(carid)
{
if(carid == 481 || carid == 509 || carid == 510)
{
return 1;
}
return 0;
} -
dannke schön Ap0llinaris und den aneren natürlich auch
-
breadfish.de
Hat das Thema geschlossen.