Beiträge von .VendeTTa.

    Hallo hat jemand evtl. eine Idee warum das hier nicht geht?


    ocmd:givetitle(playerid,params[])
    {
    if(SpielerInfo[playerid][Adminlevel] < 7)return
    new pID,title,string3[128];
    if(sscanf(params,"ui",pID,title))return SendClientMessage(playerid, GRAU, "Anwendung: '/settitle [Spieler] [Title]'");
    SpielerInfo[pID][Adminrang] = title;
    format(string3,sizeof(string3),"(( ** ADMIN ** %s hat den Tietel von %s auf %s geändert. ))",GetName(playerid),GetName(pID),title);
    SendAdminMessage(drot, string3);
    return 1;
    }



    mfg

    Hallo, folgende Fahrzeuge spawnen einfach nicht obwohl sie spawnen müssten habe es mit mehren Funktionen versucht: Createcar, AddStaticVehicle, AddStaticVehicleEx
    CreateVehicle(522,-2395.7417,341.9937,34.7387,278.7673,0.00000000,-1,-1,120); // NRG
    CreateVehicle(522,-2396.8040,340.2097,34.7349,282.3354,0.00000000,-1,-1,120); // NRG
    CreateVehicle(522,-2397.8594,338.5756,34.7404,283.7680,0.00000000,-1,-1,120); // NRG
    CreateVehicle(522,-2398.6814,337.0956,34.7417,281.3899,0.00000000,-1,-1,120); // NRG
    CreateVehicle(522,-2399.8323,335.3712,34.7461,282.5453,0.00000000,-1,-1,120); // NRG
    CreateVehicle(522,-2401.1406,333.5300,34.7430,287.5956,0.00000000,-1,-1,120); // NRG
    CreateVehicle(522,-2402.3191,331.5611,34.7439,277.4971,0.00000000,-1,-1,120); // NRG
    CreateVehicle(411,-2414.3125,349.5671,34.8990,235.7609,0.00000000,-1,-1,120); // Infi
    CreateVehicle(411,-2412.7644,352.0818,34.8989,235.0848,0.00000000,-1,-1,120); // Infi
    CreateVehicle(411,-2430.4436,321.8344,34.8990,244.8167,0.00000000,-1,-1,120); // Infi
    CreateVehicle(411,-2431.6855,319.0424,34.8990,245.4270,0.00000000,-1,-1,120); // Infi
    CreateVehicle(557,-2389.6599,353.6418,35.3636,251.6315,0.00000000,-1,-1,120); // monster
    CreateVehicle(557,-2422.5823,299.0238,35.4337,223.4267,0.00000000,-1,-1,120); // monster
    CreateVehicle(571,-2408.3772,321.1327,34.4557,196.9616,0.00000000,-1,-1,120); // kart
    CreateVehicle(571,-2409.5598,319.1306,34.4558,192.4898,0.00000000,-1,-1,120); // kart
    CreateVehicle(571,-2410.4949,317.1405,34.4555,191.5975,0.00000000,-1,-1,120); // kart
    CreateVehicle(571,-2411.8835,314.3925,34.4555,188.9751,0.00000000,-1,-1,120); // kart
    CreateVehicle(571,-2413.1448,312.0989,34.4557,190.7902,0.00000000,-1,-1,120); // kart
    CreateVehicle(571,-2414.6311,309.2859,34.4506,192.8755,0.00000000,-1,-1,120); // kart
    CreateVehicle(560,-2414.1448,322.8323,34.6737,329.5843,0.00000000,-1,-1,120); // Sultan
    CreateVehicle(560,-2410.8975,328.3636,34.6741,329.5844,0.00000000,-1,-1,120); // Sultan
    CreateVehicle(560,-2407.6577,333.8120,34.6740,328.9722,0.00000000,-1,-1,120); // Sultan
    CreateVehicle(560,-2404.1912,339.2230,34.6803,323.4310,0.00000000,-1,-1,120); // Sultan
    CreateVehicle(560,-2417.0928,316.4728,34.6740,335.0225,0.00000000,-1,-1,120); // Sultan


    mfg

    Wenn ich diese Funktion in meinem Script einbaue, funktionieren die "Stock" funktionen nicht mehr, ich hoffe mir kann wer helfen.


    ocmd:makeadmin(playerid,params[])
    {
    new plid, level;
    new text[128];
    new Adminname[64];
    if(IsPlayerConnected(plid))
    {
    if(!istPlayerAdmin(playerid, 8))return SendClientMessage(playerid,drot,"* Du hast nicht die nötigen Rechte dazu.");
    if(sscanf(params,"ui",plid,level))return SendClientMessage(playerid,grau,"Syntax: /makeadmin [ID/Name] [Adminlevel]");
    if(GetPVarInt(plid,"Adminlevel") > GetPVarInt(playerid,"Adminlevel")) return SendClientMessage(playerid,türkis,"* Du hast nicht die nötigen Rechte dazu.");
    if(level<-1||level>1337)return SendClientMessage(playerid,drot,"* Kein gültiges Adminlevel");
    new string[128];
    PlayerSpeichern(plid);
    switch(GetPVarInt(playerid,"Adminlevel"))
    {
    case -1:{Adminname="Ehrenmitglied";}
    case 0:{Adminname="Spieler";}
    case 1:{Adminname="Test-Supporter";}
    case 2:{Adminname="Junior-Supporter";}
    case 3:{Adminname="Senior-Supporter";}
    case 4:{Adminname="Moderator";}
    case 5:{Adminname="Administrator I";}
    case 6:{Adminname="Administrator II";}
    case 7:{Adminname="Community-Manager";}
    case 8:{Adminname="Projektleiter";}
    case 1337:{Adminname="Projektleiter";}
    }
    format(text,sizeof(text),"[Teamverwaltung]* %s %s hat den Administrations-Rank von %s auf Admin-Rank %i gesetzt.",Adminname,PlayerName[playerid],PlayerName[plid],level);
    for(new i=0;i<GetMaxPlayers();i++)
    {
    if(IsPlayerConnected(i))
    {
    if(istPlayerAdmin(i,2))
    {
    SendClientMessage(i,rosa,text);
    if(GetPVarInt(playerid,"Adminlevel")==0) SendClientMessage(playerid,blau,"[SERVER] Error");
    }
    }
    return 1;
    }


    mfg

    danke soweit erstmal, doch leider bekomme ich immer noch 4 Fehlermeldungen:


    C:\Users\***\Desktop\FreeRoam\gamemodes\Free.pwn(851) : error 003: declaration of a local variable must appear in a compound block
    C:\Users\***\Desktop\FreeRoam\gamemodes\Free.pwn(851) : error 017: undefined symbol "string"
    C:\Users\***\Desktop\FreeRoam\gamemodes\Free.pwn(851) : warning 215: expression has no effect
    C:\Users\***\Desktop\FreeRoam\gamemodes\Free.pwn(851) : error 001: expected token: ";", but found "]"
    C:\Users\***\Desktop\FreeRoam\gamemodes\Free.pwn(851) : fatal error 107: too many error messages on one line



    Soweit habe ich es jetzt:
    public OnPlayerText(playerid, text[])
    {
    if (normalchat)
    {
    if(GetPVarInt(playerid,"Mute")== 1)
    {
    SendClientMessage(playerid,hrot,"* Du bist derzeit im Localen-Chat gemutet");
    return 0;
    }
    else
    new string[121];
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "%s sagt: %s", sendername, text);
    ProxDetector(20.0,playerid,string,weiß,weiß,weiß,weiß,weiß);
    return 0;
    }
    return 1;
    }



    Zeile:


    new string[121];