Guden.
Ich habe ein Problem, undzwar wenn ich meine Abfrage so unter OnPlayerStateChange einbaue:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new newcar = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER)
{
if(Spieler[playerid][DrivLic] < 1)
{
if(IsACar(newcar))
{
FreezePlayer(playerid);
RemovePlayerFromVehicle(playerid);
UnfreezePlayer(playerid);
SendClientMessage(playerid, COLOR_RED, "Du hast noch keinen Führerschein!");
return 1;
}
}
Dann passiert nichts, obwohl ich in einen 'Infernus' einsteige.
Hier mal der stock für IsACar
stock IsACar(carid)
{
if(carid == 400 || carid == 401 || carid == 402 || carid == 403 || carid == 404 || carid == 405 || carid == 406
|| carid == 407 || carid == 408 || 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 == 443 || carid == 445 || carid == 451 || carid == 455
|| carid == 456 || 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 == 514
|| carid == 515 || carid == 516 || carid == 517 || carid == 518 || carid == 524 || 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;
}
Könnte mir jemand von euch da draußen helfen?
Vielen Dank im Vorraus.