Beiträge von SAB0h

    nabend , ich würde gern mal wissen wie ich ein invite befehl schreibe , den alle Leader benutzen können.
    das heisst , Leader A invitet Spieler B , dieser ist dann aber auch in seiner Fraktion.

    Wenn 2 Admins online sind & ich ein Car erstelle , kommt auf den Label : z.B Admincar von saboh und darauf Admincar von saboh2.
    Wenn aber beide ein Car erstellen ist es normal.


    ocmd:newcar(playerid,params[])
    {
    new Float:vehx,Float:vehy,Float:vehz;
    new vehid,cc1,cc2,string[300],Text3D:vehicle;
    if(sscanf(params,"iii",vehid,cc1,cc2))return SendClientMessage(playerid, ROT,"INFO: /newcar [CAR-ID] [COLOR 1] [COLOR 2]");
    if(vehid< 400 || vehid > 611) return SendClientMessage(playerid,0xFF0000FF,"Ungültige Vehicle-ID!");
    if(isPlayerAnAdmin(playerid,1))
    {
    GetVehiclePos(vehid,vehx,vehy,vehz);
    format(string,sizeof(string),"Admincar von %S",playerid);
    vehicle = Create3DTextLabel(string,ROT,vehx,vehy,vehz,50.0,0,0);
    Attach3DTextLabelToVehicle(vehicle,vehid, 0.0, 0.0, 0.75);


    new name[MAX_PLAYER_NAME];
    GetPlayerPos(playerid,vehx,vehy,vehz);
    new carid = CreateVehicle(vehid,vehx,vehy,vehz,3,cc1,cc2,-1);
    GetPlayerName(playerid,name, sizeof(name));
    format(string,sizeof(string),"T:%s",name);
    SetVehicleNumberPlate(carid,string);
    PutPlayerInVehicle(playerid, carid, 0);
    format(string,sizeof(string),"Du hast ein Admincar gespawnt!(ID:%i)",carid);
    SendClientMessage(playerid,BLAU,string);
    GetVehiclePos(vehid,vehx,vehy,vehz);
    GetPlayerName(playerid,name,sizeof(name));
    format(string,sizeof(string),"Admincar von %s",name);
    vehicle = Create3DTextLabel(string,BLAU,vehx,vehy,vehz,50.0,0,0);
    Attach3DTextLabelToVehicle(vehicle,carid, 0.0, 0.0, 0.75);


    }
    else
    {
    SendClientMessage(playerid,ROT,"Diesen Befehl kannst du nicht nutzen. Mindestens benötigter Rang: {00FF5A}Supporter");
    }
    return 1;
    }

    Wanteds werden nicht angezeigt ,aber gespeichert -.-
    ocmd:stats(playerid,params[])
    {
    new string[200],string2[200];
    SendClientMessage(playerid,0x6FABFFFF,"(______________STATS_____________)");
    format(string,sizeof(string),"[Adminlevel: %i] [Fraktion: %i] [WPS: %i]",GetPVarInt(playerid,"Adminlevel"),GetPVarInt(playerid,"Fraktion"),GetPVarInt(playerid,"Wanteds"));
    format(string2,sizeof(string2),"[Skin: %i] [Geld: %i]",GetPlayerSkin(playerid),GetPlayerMoney(playerid));
    SendClientMessage(playerid,BLAU,string);
    SendClientMessage(playerid,BLAU,string2);
    return 1;
    }

    stock SendPDMessage(farbe,const message[])
    {
    new playerid;
    for(; playerid != MAX_PLAYERS; playerid++)
    {
    if(IsPlayerConnected(playerid)) continue;
    if(isPlayerInFrak(playerid,1))
    SendClientMessage(playerid,farbe,message);
    }
    return 1;
    }

    habs so wie Trix gemacht
    C:\Users\Plyer\Desktop\script\gamemodes\test1.pwn(341) : warning 217: loose indentation
    C:\Users\Plyer\Desktop\script\gamemodes\test1.pwn(435) : error 003: declaration of a local variable must appear in a compound block
    C:\Users\Plyer\Desktop\script\gamemodes\test1.pwn(435) : error 017: undefined symbol "grund"
    C:\Users\Plyer\Desktop\script\gamemodes\test1.pwn(435) : warning 215: expression has no effect
    C:\Users\Plyer\Desktop\script\gamemodes\test1.pwn(435) : error 001: expected token: ";", but found "]"
    C:\Users\Plyer\Desktop\script\gamemodes\test1.pwn(435) : fatal error 107: too many error messages on one line


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


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    3 Errors.


    ocmd:su(playerid,params[])
    {
    if(isPlayerInFrak(playerid,1))
    new grund,string[200],string2[200],aname[MAX_PLAYER_NAME],name[MAX_PLAYER_NAME],anzahl,pID;
    if(sscanf(params,"uis",pID,anzahl,grund))return SendClientMessage(playerid,ROT,"Fehler: /su [playerid] [wanteds] [grund]");
    GetPlayerName(playerid,aname,sizeof(aname));
    GetPlayerName(pID,name,sizeof(name));
    format(string,sizeof(string),"WPS: %s hat dir %i WPS gegeben! Grund: %s ",name,anzahl,grund);
    format(string2,sizeof(string2),"WPS: %s + %i WPS | Reporter: %s | Grund:%s",name,anzahl,aname,grund);
    SendClientMessage(playerid,GREEN,string);
    SendPDMessage(BLAU,string2);
    givePlayerWanted(playerid,anzahl);
    return 1;
    }

    Ich würde das gerne so haben , dass z.B wenn ich eingebe /makeleader 0 1
    Das bei dem Spieler automatisch die Message kommt welche Fraktion er Leader gemacht wurde.



    ocmd:makeleader(playerid,params[])
    {
    if(!isPlayerAnAdmin(playerid,3))return SendClientMessage(playerid,ROT,"Rang zu Niedrig.");
    new pID,frakID,name2[MAX_PLAYER_NAME],string[100],name[MAX_PLAYER_NAME],string2[100];
    if(sscanf(params,"us",pID,frakID))return SendClientMessage(playerid,BLAU,"/makeleader [playerid] [Fraktion]");
    SetPVarInt(pID,"Leader",frakID);
    GetPlayerName(playerid,name,sizeof(name));
    GetPlayerName(pID,name2,sizeof(name2));
    format(string,sizeof(string),"%s hat dich zum Leader gemacht von der Fraktion %s",name,grund);
    SendClientMessage(pID,BLAU,string);
    format(string,sizeof(string2),"Du hast %s zum Leader von %s gemacht!",name2,grund);
    SendClientMessage(pID,BLAU,string2);

    return 1;
    }

    Command ist nicht richtig fertig , dennoch möchte ich gerne wissen, Wie der spieler das Angebot mir /accept hanf annehmen kann.
    ocmd:sellhanf(playerid,params[])
    {
    new anzahl,pID,name[MAX_PLAYER_NAME],string[90],preis,aname[MAX_PLAYER_NAME],Float:x, Float:y, Float:z;
    if(sscanf(params,"uii",pID,anzahl,preis))return SendClientMessage(playerid,ROT,"Fehler: /sellhanf id anzahl preis");
    GetPlayerPos(pID,x,y,z);
    if(!IsPlayerConnected(pID)) return SendClientMessage(playerid,ROT,"Spieler ist nicht Online");
    if(!IsPlayerInRangeOfPoint(playerid, 20.0, x, y, z)) return SendClientMessage(playerid,ROT,"Spieler ist nicht in der Nähe");
    if(!havePlayerHanf(playerid,anzahl)) return SendClientMessage(playerid,ROT,"Du hast kein Hanf");
    GivePlayerHanf(pID,anzahl);
    GetPlayerName(pID,name,sizeof(name));
    GetPlayerName(playerid,aname,sizeof(aname));
    format(string,sizeof(string),"** %s hat %s Hanf gegeben! ",aname,name);
    SendClientMessageToAll(grau,string);
    SpielerSpeichern(pID);
    SpielerSpeichern(playerid);
    return 1;


    }

    Label wird net auf dem Car angezeigt!


    ocmd:newcar(playerid,params[])
    {
    new Float:vehx,Float:vehy,Float:vehz;
    new vehid,cc1,cc2,string[128],Text3D:vehicle;
    if(sscanf(params,"iii",vehid,cc1,cc2))return SendClientMessage(playerid, ROT,"INFO: /newcar [CAR-ID] [COLOR 1] [COLOR 2]");
    if(isPlayerAnAdmin(playerid,1))
    {
    GetVehiclePos(vehid,vehx,vehy,vehz);
    format(string,sizeof(string),"Admincar von %S",playerid);
    vehicle = Create3DTextLabel(string,ROT,vehx,vehy,vehz,50.0,0,0);
    Attach3DTextLabelToVehicle(vehicle,vehid, 0.0, 0.0, 0.75);


    new name[MAX_PLAYER_NAME];
    GetPlayerPos(playerid,vehx,vehy,vehz);
    new carid = CreateVehicle(vehid,vehx,vehy,vehz,3,cc1,cc2,-1);
    GetPlayerName(playerid,name, sizeof(name));
    format(string,sizeof(string),"T:%s",name);
    SetVehicleNumberPlate(carid,string);
    PutPlayerInVehicle(playerid, carid, 0);
    format(string,sizeof(string),"Du hast ein Admincar gespawnt!");
    SendClientMessage(playerid,BLAU,string);
    }
    else
    {
    SendClientMessage(playerid,ROT,"Diesen Befehl kannst du nicht nutzen. Mindestens benötigter Rang: {00FF5A}Supporter");
    }
    return 1;
    }

    Was ist hier an den Label falsch oder sehe ich das ebenfals nicht ?!
    ocmd:newcar(playerid,params[])
    {
    new Float:vehx,Float:vehy,Float:vehz;
    new vehid,cc1,cc2,string[128],Text3D:vehicle;
    if(sscanf(params,"iii",vehid,cc1,cc2))return SendClientMessage(playerid, ROT,"INFO: /newcar [CAR-ID] [COLOR 1] [COLOR 2]");
    if(isPlayerAnAdmin(playerid,1))
    {
    GetVehiclePos(vehid,vehx,vehy,vehz);
    format(string,sizeof(string),"Admincar von %S",playerid);
    vehicle = Create3DTextLabel(string,ROT,vehx,vehy,vehz,50.0,0,0);
    Attach3DTextLabelToVehicle(vehicle,vehid, 0.0, 0.0, 0.75);


    new name[MAX_PLAYER_NAME];
    GetPlayerPos(playerid,vehx,vehy,vehz);
    new carid = CreateVehicle(vehid,vehx,vehy,vehz,3,cc1,cc2,-1);
    GetPlayerName(playerid,name, sizeof(name));
    format(string,sizeof(string),"T:%s",name);
    SetVehicleNumberPlate(carid,string);
    PutPlayerInVehicle(playerid, carid, 0);
    format(string,sizeof(string),"Du hast ein Admincar gespawnt!");
    SendClientMessage(playerid,BLAU,string);
    }
    else
    {
    SendClientMessage(playerid,ROT,"Diesen Befehl kannst du nicht nutzen. Mindestens benötigter Rang: {00FF5A}Supporter");
    }
    return 1;
    }

    so ?
    ocmd:aduty(playerid,params[]) //Admin Duty
    {


    new Text3D:ADuty[MAX_PLAYERS],adminduty[128],string[128];
    new Float:X, Float:Y, Float:Z;
    if(!isPlayerAnAdmin(playerid,6)) return SendClientMessage(playerid,ROT,"Fehler: Deine Rechte reichen nicht aus!");
    if(adminduty[playerid] == 0)
    {
    GetPlayerPos (playerid, X, Y, Z);
    ADuty[playerid] = Create3DTextLabel("Admindienst",ROT,X,Y,Z,50.0,0,0);
    format(string,sizeof(string),"*** %s ist im Admin Dienst Grund: %s",SpielerName(playerid));
    SendClientMessageToAll(ROT, string);
    Attach3DTextLabelToPlayer(ADuty[playerid], playerid, 0.0, 0.0, 0.75);
    adminduty[playerid] = 1;
    }
    else
    {
    adminduty[playerid] = 0;
    Delete3DTextLabel(ADuty[playerid]);
    format(string,sizeof(string),"**** %s ist Nicht Mehr im Admin Dienst",SpielerName(playerid));
    SendClientMessageToAll(ROT, string);
    SetPlayerColor(playerid, WEIß);
    }
    return 1;
    }

    Wie mache ich das , dass es bei nochmal /aduty eingabe , die Person offduty geht.



    ocmd:aduty(playerid,params[]) //Admin Duty
    {
    new Text3D:ADuty[MAX_PLAYER_NAME],adminduty[128];
    new Float:X, Float:Y, Float:Z;
    if(!isPlayerAnAdmin(playerid,6)) return SendClientMessage(playerid,ROT,"Fehler: Deine Rechte reichen nicht aus!");
    {
    if(adminduty[playerid] == 0)
    {

    GetPlayerPos (playerid, X, Y, Z);
    ADuty[playerid] = Create3DTextLabel("Admindienst",ROT,X,Y,Z,50.0,0,0);
    format(adminduty,sizeof(adminduty),"*** %s ist im Admin Dienst Grund: %s",SpielerName(playerid));
    SendClientMessageToAll(ROT,adminduty);
    Attach3DTextLabelToPlayer(ADuty[playerid], playerid, 0.0, 0.0, 0.75);
    adminduty[playerid] = 1;
    }
    else
    {
    adminduty[playerid] = 0;
    Delete3DTextLabel(ADuty[playerid]);
    format(adminduty,sizeof(adminduty),"**** %s ist Nicht Mehr im Admin Dienst",SpielerName(playerid));
    SendClientMessageToAll(ROT,adminduty);
    }


    }
    return 1;
    }