Beiträge von Eagle Eye

    Hey ho leute .. wenn ich /Wanted eingebe bekomm ich folgende meldung



    und im pawno steht es wie folgt
    if(strcmp(cmd, "/wanted", true) == 0)
    {
    new string1[128];
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pDBanned] == 1)
    {
    SendClientMessage(playerid, COLOR_GREY, "** You are Banned From Cop Duty!");
    return 1;
    }
    if(PlayerInfo[playerid][pDuty] == 0)
    {
    SendClientMessage(playerid, COLOR_GREY, "** You aren't on Duty!");
    return 1;
    }
    if(IsACop(playerid) || IsAFreecop(playerid))
    {
    new x;
    SendClientMessage(playerid, COLOR_GREEN, "Current Wanted Suspects:");
    for(new i=0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(WantedLevel[i] >= 1)
    {
    GetPlayerName(i, giveplayer, sizeof(giveplayer));
    format(string1, sizeof(string1), "%s %s: %d", string,giveplayer,WantedLevel[i]);
    x++;
    if(x > 3)
    {
    SendClientMessage(playerid, COLOR_YELLOW, string);
    x = 0;
    format(string1, sizeof(string1), " ");
    }
    else
    {
    format(string1, sizeof(string1), "%s, ", string);
    }
    }
    }
    }
    if(x <= 3 && x > 0)
    {
    string[strlen(string1)-2] = '.';
    SendClientMessage(playerid, COLOR_YELLOW, string);
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " You're not a Cop / FBI / National Guard !");
    }
    }//not connected
    return 1;
    }


    findet wer den fehler?

    so leute ich kuck da nciht durch wo da der fehler sein kann, wenn ich den befehl eingebe, bekomm ich dann automatisch den copleader skin, hoffe ihr könnt mir helfen


    if(strcmp(cmd, "/setskin", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /setskin [playerid/PartOfName] [skin model]");
    return 1;
    }
    new playa;
    new health;
    playa = ReturnUser(tmp);
    tmp = strtok(cmdtext, idx);
    health = strval(tmp);
    if (PlayerInfo[playerid][pAdmin] >= 1337)
    {
    if(IsPlayerConnected(playa))
    {
    if(playa != INVALID_PLAYER_ID)
    {
    new name[20];
    new victim[20];
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerName(playa, victim, sizeof(victim));
    PlayerInfo[playa][pModel] = health;
    PlayerInfo[playa][pChar] = health;
    SetPlayerSkin(playa, PlayerInfo[playa][pChar]);
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, " Du darfs diesen Befehl nicht benützen!");
    }
    }
    return 1;
    }

    hmmd as habe ich erwartet, jedoch mit dem cmd wäre es vlt möglich, das man dicht etc einstellen kann, jedoch sollte es dann für alle so sichtbar sein. könnte klappen, jetzt nur noch die frage, wie man die wirkung festlegt

    ja okay dann mach ichs selber nach dem ich ausgepennt habe


    Zitat

    D:\GTA SA MP\filterscripts\death.pwn(2) : error 017: undefined symbol "0"
    D:\GTA SA MP\filterscripts\death.pwn(125) : warning 217: loose indentation


    und die zeilen dazu


    zeile 2
    #pragma unused 0


    zeile 125
    return 0;


    und das ganze


    #include <a_samp>
    #pragma unused 0


    #define FILTERSCRIPT


    new Dead[MAX_PLAYERS], Float:DX[MAX_PLAYERS], Float:DY[MAX_PLAYERS],Float:DZ[MAX_PLAYERS],Float:DA[MAX_PLAYERS],DTimer[MAX_PLAYERS];
    public OnPlayerConnect(playerid)
    {
    Dead[playerid] = 0;
    return 1;
    }


    public OnPlayerDeath(playerid,killerid,reason)
    {
    Dead[playerid] = 1;
    GetPlayerPos(playerid,DX[playerid],DY[playerid],DZ[playerid]);
    GetPlayerFacingAngle(playerid,DA[playerid]);
    DTimer[playerid] = SetTimerEx("DSpawn", 180*1000, 0, "i",playerid);
    return 1;
    }


    public OnPlayerDisconnect(playerid,reason)
    {
    Dead[playerid] = 0;
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    if(Dead[playerid] == 1)
    {
    SetTimerEx("DSpawned", 100, 0, "i",playerid);
    }
    return 1;
    }


    forward DSpawn(playerid);
    public DSpawn(playerid)
    {
    if(Dead[playerid] == 1)
    {
    Dead[playerid] = 0;
    TogglePlayerControllable(playerid,1);
    ClearAnimations(playerid);
    SpawnPlayer(playerid);
    SetPlayerHealth(playerid,100);
    SetCameraBehindPlayer(playerid);
    }
    }


    forward DSpawned(playerid);
    public DSpawned(playerid)
    {
    if(Dead[playerid] == 1)
    {
    SetPlayerPos(playerid,DX[playerid],DY[playerid],DZ[playerid]);
    SetPlayerHealth(playerid,1); // Soll so aussehen, als ob man 0 Leben hätte^^
    SetPlayerCameraPos(playerid,DX[playerid],DY[playerid],DZ[playerid]+3);
    ResetPlayerWeapons(playerid);
    SetPlayerCameraLookAt(playerid,DX[playerid],DY[playerid],DZ[playerid]);
    SetPlayerFacingAngle(playerid,DA[playerid]);
    TogglePlayerControllable(playerid,0);
    ApplyAnimation(playerid,"PARACHUTE","FALL_skyDive_DIE",4.1,0,1,1,1,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 OnPlayerCommandText(playerid, cmdtext[])
    {


    if (strcmp("/kill", cmdtext, true, 10) == 0) //Zum Testen
    {
    SetPlayerHealth(playerid,0);
    return 1;
    }


    new cmd[30];
    new idx;
    cmd = strtok(cmdtext, idx);


    if(strcmp(cmd, "/heilen", true) == 0)
    {
    new tmp[30];
    tmp = strtok(cmdtext, idx);
    new otherplayer = strval(tmp);
    new Float:X,Float:Y,Float:Z;
    GetPlayerPos(otherplayer,X,Y,Z);
    if(IsPlayerConnected(otherplayer) == 1 && Dead[otherplayer] == 1 && IsPlayerInRangeOfPoint(playerid, 2.0, X, Y, Z) && playerid != otherplayer && Dead[playerid] == 0)
    {
    Dead[otherplayer] = 0;
    TogglePlayerControllable(otherplayer,1);
    KillTimer(DTimer[otherplayer]);
    SetPlayerHealth(otherplayer,50);
    SetCameraBehindPlayer(otherplayer);
    ApplyAnimation(playerid,"ped","getup",2.5,0,1,1,0,1);
    new Heilername[MAX_PLAYER_NAME];
    new Opfername[MAX_PLAYER_NAME];
    new string[128];
    GetPlayerName(otherplayer, Opfername, sizeof(Opfername));
    format(string, sizeof(string), "Du hast %s (ID:%d) wiederbelebt.",Opfername,otherplayer);
    SendClientMessage(playerid,0xFFFF00AA, string);
    new stringz[128];
    GetPlayerName(playerid, Heilername, sizeof(Heilername));
    format(stringz, sizeof(stringz), "Du wurdest von %s (ID:%d) wiederbelebt.",Heilername,playerid);
    SendClientMessage(otherplayer,0xFFFF00AA, stringz);
    }
    return 1;
    }
    return 0;
    }
    public OnPlayerText(playerid, text[])
    {
    if(Dead[playerid] == 1)
    {
    SendClientMessage(playerid,0xFFFF00AA,"Tote können nicht reden.");
    return 0;
    }
    return 1;
    }