Beiträge von Blackshadowscript

    fInfo:
    new fInfo[][frakteEnum] ={
    {"zivi",0.0,0.0,0.0,0.0,0,0,weiß}, //zivi
    {"LVPD",2286.9927,2431.6108,10.8203,176.4932,0,0,dunkelblau}, //LVPD
    {"SWAT",-2719.8411,-318.3455,7.8438,46.7307,0,0,helblau}, //SWAT
    {"FBI",-1606.3145,712.2166,13.8672,14.9407,0,0,duneklhelblau}, //FBI
    {"ARMY",245.4032,1859.6956,14.0840,86.8001,0,0,hellgrün}, //ARMY
    {"Medic/Feuerwehr",-319.8502,1049.1862,20.3403,351.6078,0,0,rot}, //MEDIC/FEUERWEHR
    {"FAHRSCHULE",662.8862,1716.9479,7.1875,37.0085,0,0,orange}, //FAHRSCHULE
    {"Aztecas",1531.2836,751.6505,11.0234,265.7675,0,0,türkis}, //Aztecas
    {"VAGOS",-2280.8035,2288.0842,4.9590,285.9662,0,0,gelb}, //VAGOS
    {"BALLAS",1457.6174,2772.6257,10.8203,263.1655,0,0,pink}, //BALLAS
    {"YAKUZA",1956.0493,729.8642,10.8203,106.5192,0,0,grau}// YAKUZA
    };


    getPlayerName(playerid)
    {
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    return name;
    }
    //ocmd Befehle:
    ocmd:Leadererstellen(playerid,params[])
    {
    if(!isAdmin(playerid,5))return SendClientMessage(playerid,grün,"Du hast keine Berechtigung dazu!");
    new pID,fID;
    if(sscanf(params,"ui",pID,fID))return
    SendClientMessage(playerid,dunkelblau,"INFO: /Leadererstellen [playerid][fraktid]");
    if(fID>= sizeof(fInfo))return SendClientMessage(playerid,rot,"Die Fraktion existiert nicht!");
    sInfo[pID][fraktion] = fID;
    sInfo[pID][rang] = 5;
    new string[500];
    format(string,sizeof(string),"%s hat Sie zum Leader der Fraktion ernannt. Sie haben nun 5Wochen eine Fraktionssperre!\nSollten sie vorher die Fraktionverlassen bekommen sie eine Leaderverwarnung!",getPlayerName(playerid),fInfo[fID][f_name]);
    SendClientMessage(pID,grün,string);
    SendClientMessage(playerid,orange,"Du hast einen Spieler zum Leader einer Fraktion gemacht!");
    return 1;
    }


    ich bekomme einfach keine errors mehr

    bei mir steht nun:


    public datum()
    {
    new year,month,day;
    new string[64];
    getdate(year, month, day);
    format(string,sizeof(string),"%02d:%02d:%d",year,month,day);
    TextDrawSetString(Jahr,string);
    return 1;
    }



    fehler:
    samplernen.p(483) : error 021: symbol already defined: "datum"

    Laut den Fehlermeldungen in den folgenden Bereichen:
    forword OnUserCheck(playerid);


    Teil1:
    public OnUserCheck(playerid)
    {
    new num_rows,num_fields;
    cache_get_data(num_rows,num_fields,dbhandle);
    if(num_rows==0)
    {
    //Register
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Account Erstellung","Gebe bitte nun dein gewünschtes Passwort ein!","Registrieren","Abbrechen");
    }
    else
    {
    //Login
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Anmelden","Gebe bitte dein Passwort ein.","Anmleden","Abbrechen");
    }
    return 1;
    }


    public OnPlayerConnect(playerid)
    {
    new nachricht[128];
    format(nachricht,sizeof(nachricht),"Du bist mit der ID %i verbunden.",playerid);
    SendClientMessage(playerid,rot,nachricht);
    //Login/Register:
    new name[MAX_PLAYER_NAME],query[128];
    GetPlayerName(playerid,name,sizeof(name));
    format(query,sizeof(query),"SELECT id FROM user WHERE username='%s' ",name);
    mysql_function_query(dbhandle,query,true,"OnUserCheck","i",playerid);
    SendClientMessage(playerid,grün,"Willkommen auf Reallife Version 1.0! Wir wünschen euch ein angenhmen Spiel spaß bei uns!");


    //removebildings:
    RemoveBuildingForPlayer(playerid, 8420, 2397.3906, 1663.2266, 9.8438, 0.25);
    RemoveBuildingForPlayer(playerid, 8433, 2437.3906, 1663.2344, 14.0781, 0.25);
    RemoveBuildingForPlayer(playerid, 710, 2412.6406, 1700.6172, 25.4375, 0.25);
    RemoveBuildingForPlayer(playerid, 710, 2420.3984, 1626.6406, 25.4375, 0.25);
    RemoveBuildingForPlayer(playerid, 710, 2435.0781, 1626.6406, 25.4375, 0.25);
    RemoveBuildingForPlayer(playerid, 8736, 2437.3906, 1663.2344, 14.0781, 0.25);
    RemoveBuildingForPlayer(playerid, 8773, 2474.8906, 1663.2266, 9.8438, 0.25);
    RemoveBuildingForPlayer(playerid, 8966, 2435.2578, 1662.9063, 14.0703, 0.25);
    RemoveBuildingForPlayer(playerid, 9062, 2474.8906, 1663.2266, 9.8438, 0.25);
    RemoveBuildingForPlayer(playerid, 9063, 2397.3906, 1663.2266, 9.8438, 0.25);
    RemoveBuildingForPlayer(playerid, 747, 2380.5000, 1626.2109, 10.0625, 0.25);
    RemoveBuildingForPlayer(playerid, 681, 2382.2813, 1624.6328, 9.9453, 0.25);
    RemoveBuildingForPlayer(playerid, 681, 2379.4063, 1629.1406, 9.9453, 0.25);
    RemoveBuildingForPlayer(playerid, 634, 2399.1406, 1624.9063, 9.9219, 0.25);
    RemoveBuildingForPlayer(playerid, 1231, 2435.4688, 1642.1406, 12.5391, 0.25);
    RemoveBuildingForPlayer(playerid, 1231, 2397.3750, 1663.2266, 12.6719, 0.25);
    RemoveBuildingForPlayer(playerid, 996, 2391.7891, 1663.1719, 10.6797, 0.25);
    RemoveBuildingForPlayer(playerid, 996, 2409.5156, 1663.1719, 10.6797, 0.25);
    RemoveBuildingForPlayer(playerid, 1231, 2417.2188, 1663.2266, 12.5391, 0.25);
    RemoveBuildingForPlayer(playerid, 1215, 2423.6250, 1668.6172, 10.3516, 0.25);
    RemoveBuildingForPlayer(playerid, 1215, 2423.6250, 1656.8438, 10.3516, 0.25);
    RemoveBuildingForPlayer(playerid, 8550, 2435.2578, 1662.9063, 14.0703, 0.25);
    RemoveBuildingForPlayer(playerid, 1215, 2441.2969, 1651.6484, 10.3516, 0.25);
    RemoveBuildingForPlayer(playerid, 1215, 2428.9688, 1651.6484, 10.3516, 0.25);
    RemoveBuildingForPlayer(playerid, 1231, 2435.4688, 1682.6094, 12.5469, 0.25);
    RemoveBuildingForPlayer(playerid, 1215, 2428.9688, 1673.7734, 10.3516, 0.25);
    RemoveBuildingForPlayer(playerid, 1215, 2441.2969, 1673.7734, 10.3516, 0.25);
    RemoveBuildingForPlayer(playerid, 8563, 2434.7266, 1702.3281, 13.9844, 0.25);
    RemoveBuildingForPlayer(playerid, 747, 2440.4922, 1698.5781, 10.0625, 0.25);
    RemoveBuildingForPlayer(playerid, 634, 2449.1016, 1701.4922, 9.9219, 0.25);
    RemoveBuildingForPlayer(playerid, 1215, 2447.4922, 1656.8438, 10.3516, 0.25);
    RemoveBuildingForPlayer(playerid, 1215, 2447.4922, 1668.6172, 10.3516, 0.25);
    RemoveBuildingForPlayer(playerid, 1231, 2453.3359, 1663.2266, 12.5391, 0.25);
    RemoveBuildingForPlayer(playerid, 996, 2471.9609, 1663.1719, 10.6797, 0.25);
    RemoveBuildingForPlayer(playerid, 634, 2459.0703, 1624.9063, 9.9219, 0.25);
    RemoveBuildingForPlayer(playerid, 620, 2454.9297, 1701.5938, 9.8438, 0.25);
    RemoveBuildingForPlayer(playerid, 1231, 2477.3984, 1663.2266, 12.6719, 0.25);
    RemoveBuildingForPlayer(playerid, 620, 2475.3125, 1628.6094, 9.8438, 0.25);
    RemoveBuildingForPlayer(playerid, 681, 2475.2422, 1624.6328, 9.9453, 0.25);
    RemoveBuildingForPlayer(playerid, 8551, 2479.9453, 1624.3203, 13.9844, 0.25);
    RemoveBuildingForPlayer(playerid, 996, 2489.6953, 1663.1719, 10.6797, 0.25);
    RemoveBuildingForPlayer(playerid, 746, 2494.8906, 1626.1719, 10.0625, 0.25);
    RemoveBuildingForPlayer(playerid, 681, 2494.6641, 1628.7734, 9.9453, 0.25);
    }



    Teil2:
    forward sekunde();
    forward datum();
    public sekunde()
    {
    new string[128];
    for(new i=0; i<MAX_PLAYERS; i++)
    {
    if(!IsPlayerConnected(i))continue;
    if(!IsPlayerInAnyVehicle(i))continue;
    format(string,sizeof(string),"%ikm/h",Spielergeschwindigkeit(i));
    GameTextForPlayer(i,string,1000,3);
    }
    new hour,minute,second;
    gettime(hour,minute,second);
    format(string,sizeof(string),"%02d:%02d",hour,minute,second);
    TextDrawSetString(uhrzeitLabel,string);
    return 1;

    public datum()
    {
    new string[64];
    getdate(Year, Month, Day);
    format(string,sizeof(string),"%02d:%02d:%d",day,month,Year);
    TextDrawSetString(Jahr,string);
    return 1;
    }


    Teil 3:
    gehört noch zu Spielerverbinden
    //textdraws anzeigen:
    TextDrawShowForPlayer(playerid,Text:uhrzeitLabel);
    TextDrawShowForAll(Jahr);
    return 1;



    Fehlermeldung:


    also ich habe es jetzt so:


    static datum();
    public datum()
    {
    new string[30], year, month;
    getdate(year,month),
    format(string,sizeof(string),"%02d:%02d%",day,month),
    TextDrawSetString(Jahr,string);
    return;
    }




    es kommt aber folgendes:

    PHP
    samplernen.p(482) : error 021: symbol already defined: "datum"
    samplernen.p(484) : error 021: symbol already defined: "datum"
    samplernen.p(486 -- 487) : error 017: undefined symbol "day"

    forward sekunde();
    forward datum();


    //new
    new Text:uhrzeitLabel;
    new Text: Jahr;


    so wie:
    //Textdraws:
    uhrzeitLabel =TextDrawCreate(549.000000, 46.000000, "22:30");
    TextDrawBackgroundColor (uhrzeitLabel, 255);
    TextDrawFont (uhrzeitLabel, 0);
    TextDrawLetterSize (uhrzeitLabel, 0.569999, 1.000000);
    TextDrawColor (uhrzeitLabel, 16711935);
    TextDrawSetOutline (uhrzeitLabel, 0);
    TextDrawSetProportional (uhrzeitLabel, 1);


    Jahr =TextDrawCreate(542.000000, 37.000000, "03.06.2015");
    TextDrawBackgroundColor (Jahr, 255);
    TextDrawFont (Jahr, 1);
    TextDrawLetterSize (Jahr, 0.500000, 1.000000);
    TextDrawColor (Jahr, -16776961);
    TextDrawSetOutline (Jahr, 0);
    TextDrawSetProportional (Jahr, 1);



    und:


    public sekunde()
    {
    new string[128];
    for(new i=0; i<MAX_PLAYERS; i++)
    {
    if(!IsPlayerConnected(i))continue;
    if(!IsPlayerInAnyVehicle(i))continue;
    format(string,sizeof(string),"%ikm/h",Spielergeschwindigkeit(i));
    GameTextForPlayer(i,string,1000,3);
    }
    new hour,minute,second;
    gettime(hour,minute,second);
    format(string,sizeof(string),"%02d:%02d",hour,minute,second);
    TextDrawSetString(uhrzeitLabel,string);
    return 1;
    }
    static datum();
    {
    new string[30], year, month;
    getdate(year,month),
    format(string,sizeof(string),"%02d:%02d%",day,month),
    TextDrawSetString(Jahr,string);
    return;
    }


    voll am durch drehen:


    Fehlermeldeung:

    So sieht es bei mir aus:


    forward datum();


    dann den new Text: Jahr; für Textdraw



    Textdraw
    Jahr =TextDrawCreate(542.000000, 37.000000, "03.06.2015");
    TextDrawBackgroundColor (Jahr, 255);
    TextDrawFont (Jahr, 1);
    TextDrawLetterSize (Jahr, 0.500000, 1.000000);
    TextDrawColor (Jahr, -16776961);
    TextDrawSetOutline (Jahr, 0);
    TextDrawSetProportional (Jahr, 1);




    so steht alles bei mir im Public:
    public datum()
    new string[128];
    for(new i=0; i<MAX_PLAYERS; i++)
    format(string,sizeof(string),"%datum:"datum);
    getdate(year,month,day);
    format(string,sizeof(string),"%02d:%02d%",year,month,day);
    TextDrawSetString(Jahr,string)



    Ich hoffe man kann mir hier helfen.

    public:


    public sekunde()
    {
    new string[128];
    for(new i=0; i<MAX_PLAYERS; i++)
    {
    if(!IsPlayerConnected(i))continue;
    if(!IsPlayerInAnyVehicle(i))continue;
    format(string,sizeof(string),"%ikm/h",Spielergeschwindigkeit(i));
    GameTextForPlayer(i, string, 1000, 3);
    }
    return 1;
    }



    Spielergeschwindigkeit(playerid)
    {
    new Float:x,Float:y,Float:z,Float:rtn;
    if(IsPlayerInAnyVehicle(playerid))
    {
    GetVehicleVelocity(GetPlayerVehicleID(playerid),x,y,z);
    }
    else
    {
    GetPlayerVelocity(playerid,x,y,z);
    }
    //rtn = wurzel (x*x+ y*y+ z*z);
    rtn = Float:floatsqroot(x*x+ y*y+ z*z);
    return floatround(rtn * 100 * 1.61);
    }


    es wird nichts angezeigt warum auch immer

    Guten Abend.


    Bei mir zeigt die Server.log datei folgendes immer an:


    PHP
    [21:03:42] [connection] 127.0.0.1:57701 requests connection cookie.
    [21:03:43] Incoming connection: 127.0.0.1:57701 id: 0
    [21:03:43] [join] Drakedog has joined the server (0:127.0.0.1)


    Ich habe kein plan wieso es auftaucht

    Guten Tag.


    Meine Frage:


    Wenn ich eine Gerage selbst Mappe und möchte das man mit ein Befehl um das Geragentor auf/zu machen und dann in der gerage zu parken würde es besser gehen mit /parken zu machen als Befehl oder lieber mit ein Enum zu arbeiten? Da ich mich damit nicht auskenn