Beiträge von SkrilLinux

    Ich habe ihm geholfen aber jetzt gibt es noch ein Problem was ich auch nicht beheben kann -.-
    Hier das Warning:
    warning 219: local variable "mod" shadows a variable at a preceding level
    Es sieht einfach aus ist es aber nicht :D

    Versuchs mal hiermit:


    new countdown = 60;
    forward countmedown();


    SetTimer("countmedown",1000,0);


    public countmedown()
    {
    if(countdown > 1)
    {
    new string[128];
    format(string,sizeof(string),"Countdown: %d",countdown);
    GameTextForAll(string,1000,3);
    SetTimer("countmedown",1000,0);
    countdown --;
    }
    else
    {
    GameTextForAll("Der Countdown ist abgelaufen",1000,3);
    countdown = 0;
    }
    }


    Machs doch unter OnPlayerStateChange


    Wie wärs damit?


    Du frägst hier eine Variable ab:
    if(GetPVarInt(playerid,"Flugzeug") == 0)


    Hast sie aber nicht als eine Variable definiert:
    forward IsABike(carid);
    public IsABike(carid)
    {
    new modelid = GetVehicleModel(carid);
    if(modelid == 521 || modelid == 522 || modelid == 523 || modelid == 468)
    {
    return 1;
    }
    return 0;
    }
    Nimm einfach meinen Code, der funktioniert zu 100%
    ;)

    Hier, sry für die schlechte einreihung ^^
    if(newstate==PLAYER_STATE_DRIVER) //Wenn der Spieler als Fahrer in ein Auto steigt
    {
    new modelid = GetVehicleModel(GetPlayerVehicleID(playerid));
    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 == 429 || modelid == 434 || modelid == 436 ||
    modelid == 438 || modelid == 439 || modelid == 440 || modelid == 442 || modelid == 445 || modelid == 451 || modelid == 456 || modelid == 457 || 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 == 485 || 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 == 524 || modelid == 525 || modelid == 526 || modelid == 527 || modelid == 528 || modelid == 529 ||
    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 == 559 || modelid == 560 || modelid == 561 || modelid == 562 || modelid == 565 || modelid == 566 ||
    modelid == 567 || modelid == 568 || modelid == 574 || 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 )
    {
    if(GetPVarInt(playerid,"Führerschein")==0)
    {
    SendClientMessage(playerid, FARBE_ROT, "Du hast keinen Auto Führerschein!");
    RemovePlayerFromVehicle(playerid);
    }
    }
    if(modelid == 472 || modelid == 473 || modelid == 493 || modelid == 595 || modelid == 484 || modelid == 430 || modelid == 453 || modelid == 452 || modelid == 446 || modelid == 454 )
    {
    if(GetPVarInt(playerid,"Bootschein")==0)
    {
    SendClientMessage(playerid, FARBE_ROT, "Du hast keinen Boots Führerschein!");
    RemovePlayerFromVehicle(playerid);
    }
    }
    if(modelid == 403 || modelid == 406 || modelid == 407 || modelid == 408 || modelid == 427 || modelid == 431 || modelid == 433 || modelid == 437 || modelid == 443 || modelid == 444|| modelid == 455 || modelid == 456 || modelid == 498 || modelid == 514|| modelid == 515|| modelid == 524|| modelid == 532|| modelid == 537|| modelid == 538|| modelid == 544|| modelid == 556|| modelid == 557|| modelid == 573|| modelid == 578|| modelid == 601|| modelid == 609|| modelid == 432 )
    {
    if(GetPVarInt(playerid,"LKW Schein")==0)
    {
    SendClientMessage(playerid, FARBE_ROT, "Du hast keinen LKW Führerschein!");
    RemovePlayerFromVehicle(playerid);
    }
    }
    if(modelid == 417 || modelid == 425 || modelid == 447 || modelid == 469 || modelid == 476 || modelid == 487 || modelid == 488 || modelid == 497 || modelid == 511 || modelid == 512|| modelid == 513|| modelid == 519|| modelid == 520|| modelid == 553|| modelid == 563|| modelid == 577|| modelid == 592|| modelid == 593|| modelid == 460 )
    {
    if(GetPVarInt(playerid,"Flugschein")==0)
    {
    SendClientMessage(playerid, FARBE_ROT, "Du hast keinen Flugzeug Führerschein!");
    RemovePlayerFromVehicle(playerid);
    }
    }
    if(modelid == 461 || modelid == 463 || modelid == 468 || modelid == 521 || modelid == 522 || modelid == 523 || modelid == 581 || modelid == 586 )
    {
    if(GetPVarInt(playerid,"Motorradschein")==0)
    {
    SendClientMessage(playerid, FARBE_ROT, "Du hast keinen Motorrad Führerschein!");
    RemovePlayerFromVehicle(playerid);
    }
    }
    }

    Hey Leute,
    wie kann ich das machen das nach dem Namen dir Farbe auf die hier geändert wird?


    stock Admintextname(playerid)
    {
    new adminrankname[128];
    switch(GetPVarInt(playerid,"Adminlevel"))
    {
    case 0:{adminrankname= "{FF0000}»User«";}
    case 1:{adminrankname= "{FF0000}»Supporter«";}
    case 2:{adminrankname= "{FF0000}»Moderrator«";}
    case 3:{adminrankname= "{FF0000}»Super-Moderrator«";}
    case 4:{adminrankname= "{FF0000}»Admin«";}
    case 5:{adminrankname= "{FF0000}»Owner«";}
    }
    return adminrankname;
    }


    Also nach dem Namen ändern auf:
    GetPlayerColor(playerid)


    Wie mache ich das?


    Anwendung:
    public OnPlayerText(playerid, text[])
    {
    new string[128],name[24];
    new stunde1, minute1, sekunde1;
    gettime(stunde1, minute1, sekunde1);
    GetPlayerName(playerid, name, 24);
    format(string, 128,"[%02d:%02d:%02d | ID: %d] %s %s : {FFFFFF}%s",stunde1,minute1,sekunde1,playerid,Admintextname(playerid),name,text);
    SendClientMessageToAll(GetPlayerColor(playerid), string);
    SetPlayerChatBubble(playerid,text, GetPlayerColor(playerid), 50.0, 6000);
    return 0;
    }