Beiträge von Sony

    if(strcmp(cmd, "/tazer", true) ==0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3|| PlayerInfo[playerid][pMember] == 21 || PlayerInfo[playerid][pLeader] == 21)
    {
    if(OnDuty[playerid]==0)
    {
    SendClientMessage(playerid, COLOR_GREY, "Du bist nicht im Dienst!");
    return 1;
    }
    if(IsPlayerInAnyVehicle(playerid))
    {
    SendClientMessage(playerid, COLOR_GREY, "Du kannst das nicht benutzen während du im Fahrzeug sitzt!");
    return 1;
    }
    new suspect = GetClosestPlayer(playerid);
    if(IsPlayerConnected(suspect))
    {
    if(PlayerCuffed[suspect] > 0)
    {
    SendClientMessage(playerid, COLOR_GREY, "Dieser Spieler ist schon getazed!");
    return 1;
    }
    if(GetDistanceBetweenPlayers(playerid,suspect) < 5)
    {
    if(OnDuty[suspect]==1)
    {
    SendClientMessage(playerid, COLOR_GREY, "Du kannst keinen Beamten Tazern!");
    return 1;
    }
    if(IsPlayerInAnyVehicle(suspect))
    {
    SendClientMessage(playerid, COLOR_GREY, "Dieser Spieler ist in einem Fahrzeug! Bringe in zuerst raus!");
    return 1;
    }
    GetPlayerName(suspect, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "* Du wurdest von %s mit seinem Elektroschocker geschockt.", sendername);
    SendClientMessage(suspect, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Du hast %s niedergestreckt.", giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* %s nimmt seinen Elektroschocker raus und streckt %s nieder.", sendername ,giveplayer);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    GameTextForPlayer(suspect, "~y~Geschockt!", 3000, 3);
    TogglePlayerControllable(suspect, 0);
    PlayerCuffed[suspect] = 1;
    PlayerCuffedTime[suspect] = 8;
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, "Niemand ist in deiner Nähe!");
    return 1;
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, "Du bist kein Beamter!");
    }
    }
    return 1;
    }


    so jetzt müsste es gehen

    public OnPlayerDisconnect(playerid, reason)
    {
    new pname[MAX_PLAYER_NAME], path[200];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(path, sizeof(path), "/spieler/%s.ini", pname);


    dini_IntSet(path, "sex", pInfo[playerid][sex]);
    dini_IntSet(path, "age", pInfo[playerid][age]);
    dini_IntSet(path, "AdminLevel", pInfo[playerid][AdminLevel]);
    dini_IntSet(path, "Leader", pInfo[playerid][Leader]);
    dini_IntSet(path, "Skin", GetPlayerSkin(playerid));


    pInfo[playerid][logged] = 0;


    return 1;
    }


    versuch es mal so

    public OnPlayerCommandText(playerid, cmdtext[])
    {
    //----------------------------------------[heal]----------------------------------------


    if (strcmp("/heal", cmdtext, true, 5) == 0)
    {
    if(Player[playerid][admin] < 1)
    {
    SetPlayerHealth(playerid, 100.0);
    SendClientMessage(playerid, COLOR_WHITE, "Du wurdest geheilt.");
    }
    return 1;
    }
    return 0;
    }


    so muss des alles aussehen wen des bei dir einzigste command ist!

    if (strcmp("/heal", cmdtext, true, 5) == 0)
    {
    if(Player[playerid][admin] < 1)
    {
    SetPlayerHealth(playerid, 100.0);
    SendClientMessage(playerid, COLOR_WHITE, "Du wurdest geheilt.");
    }
    return 1;
    }


    so jetzt aber!