Beiträge von Radek_Hillers

    Guten morgen..
    ich wollte mir ein blaulicht auf meim car scripten aber es geht nicht :( schade es kommen aber auch keine errors vill könntet ihr ja mal reinschauen hir der script:
    // This is a comment
    // uncomment the line below if you want to write a filterscript
    //#define FILTERSCRIPT




    #include <a_samp>
    new sirene[MAX_VEHICLES];
    new sirene1[MAX_VEHICLES];
    new sirene2[MAX_VEHICLES];
    new sirene3[MAX_VEHICLES];
    new UCL[MAX_VEHICLES];


    public OnFilterScriptInit()
    {
    print("\n--------------------------------------");
    print(" Blaulicht");
    print("--------------------------------------\n");
    return 1;
    }


    public OnFilterScriptExit()
    {
    return 1;
    }


    public OnVehicleSpawn(vehicleid)
    {
    DestroyObject(sirene[vehicleid]);
    DestroyObject(sirene1[vehicleid]);
    DestroyObject(sirene2[vehicleid]);
    DestroyObject(sirene3[vehicleid]);
    UCL[vehicleid] = 0;
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if(strcmp(cmdtext, "/blaulicht",true) == 0)
    {
    if(UCL[GetPlayerVehicleID(playerid)] == 1)
    {
    sirene[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100);
    sirene1[GetPlayerVehicleID(playerid)] = CreateObject(18646,0,0,0,0,0,0,100);
    sirene2[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100);
    sirene3[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100);
    AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
    AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.5,0.0,0.85,0,0,0);//Dach sirene
    AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
    AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
    UCL[GetPlayerVehicleID(playerid)] = 1;
    return 1;
    }
    else if(UCL[GetPlayerVehicleID(playerid)] == 573)
    {
    DestroyObject(sirene[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene1[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene2[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene3[GetPlayerVehicleID(playerid)]);
    UCL[GetPlayerVehicleID(playerid)] = 0;
    return 1;
    }
    }
    return 0;
    }


    Und ich habe KEINE errors!

    Ich habe ein problem bei eim script von fansocke undzwar es kommen keine warns und keine errors aber das auto macht trotzdem boom wo ist mein fehler ?
    Hir Der Script:
    #include <a_samp>


    forward IfAutoKaputtTimer(playerid);
    forward Float:GetDistanceBetweenPlayers(p1,p2);
    #define COLOR_RED 0xE60000FF
    #define COLOR_WHITE 0xFFFFFFFF
    static bool:PlayerMessageMotorschaden[MAX_PLAYERS] = {false};
    public OnFilterScriptInit()
    {
    print("\n--------------------------------------");
    print(" Feuerwehr Script by Funsocke");
    print("--------------------------------------\n");
    SetTimer("IfAutoKaputtTimer", 1000, 1);
    return 1;
    }
    strtok(const string[], &index)
    {
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
    index++;
    }


    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
    result[index - offset] = string[index];
    index++;
    }
    result[index - offset] = EOS;
    return result;
    }
    public OnPlayerDisconnect(playerid, reason)
    {
    PlayerMessageMotorschaden[playerid] = true;
    return 1;
    }
    public Float:GetDistanceBetweenPlayers(p1,p2){
    new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
    if (!IsPlayerConnected(p1) || !IsPlayerConnected(p2)){
    return -1.00;
    }
    GetPlayerPos(p1,x1,y1,z1);
    GetPlayerPos(p2,x2,y2,z2);
    return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
    }
    public IfAutoKaputtTimer(playerid)
    {
    new Float:health;
    new string[256];
    new vehicleid = GetPlayerVehicleID(playerid);
    if(IsPlayerInAnyVehicle(playerid))
    {
    GetVehicleHealth(vehicleid, health);
    format(string, 256, "~n~~n~~n~~n~~n~~n~~g~Auto Schaden : ~w~%.0f",health);
    GameTextForPlayer(playerid, string, 2000, 3);
    }


    new VID, Float:h_vid;
    if(IsPlayerConnected(playerid) && IsPlayerInAnyVehicle(playerid))
    {
    VID = GetPlayerVehicleID(playerid);
    GetVehicleHealth(VID, h_vid);
    if(h_vid <= 185 && PlayerMessageMotorschaden[playerid] == true)
    {
    TogglePlayerControllable(playerid, 0);
    SendClientMessage(playerid, 0xFF6900AA, "Dieses Fahrzeug hat nun einen Motorschaden. Rufe die /112");
    PlayerMessageMotorschaden[playerid] = true;
    SetVehicleHealth(vehicleid, 185.0);
    SetPlayerHealth(playerid,100);
    } }
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    new sendername[MAX_PLAYER_NAME];
    new cmd[256];
    new idx;
    new string[256];
    cmd = strtok(cmdtext,idx);


    if(strcmp(cmd, "/befrei", true) == 0)
    {
    new tmp[256];
    new giveplayer[200];


    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    new otherplayer = strval(tmp);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "[BENUTZUNG]: /befrei [SpielerID]");
    return 1;
    }
    if(!IsPlayerConnected(otherplayer)) return SendClientMessage(playerid, COLOR_WHITE, "Falsche SpielerID !");
    if(GetDistanceBetweenPlayers(playerid,otherplayer <= 5.0))
    {
    GetPlayerName(otherplayer, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    new Float:X;
    new Float:Y;
    new Float:Z;
    GetPlayerPos(playerid,X,Y,Z);
    SetPlayerPos(otherplayer,X,Y+1,Z);
    format(string, sizeof(string), "Du hast %s gerettet!!.", giveplayer);
    SendClientMessage(playerid,COLOR_WHITE, string);
    SendClientMessage(otherplayer, COLOR_WHITE, "Du wurdest gerettet");
    TogglePlayerControllable(playerid, 1);
    }
    else
    {
    SendClientMessage(playerid, COLOR_RED, "Der Spieler ist zu weit von dir entfernt !");
    }


    }
    return 1;
    }
    if(strcmp(cmdtext, "/112", true) == 0 || strcmp(cmdtext, "/feuerwehr", true) == 0)
    {
    new pname[30], str[100];
    GetPlayerName(playerid,pname,sizeof(pname));
    format(str,sizeof(str), "%s braucht die Feuwehr!",pname);
    SendClientMessageToAll(COLOR_RED,str);
    return 1;
    }
    return 0;
    }


    WEn ihr den fehler erkannt habt bitte sagt mir bescheid ich finde ihn NICHT.
    Mfg Radek_Hillers