Beiträge von InternetInk aka Benjamin

    Ja hallo es ist spät :rolleyes: Probier ma so:
    if(reason == 0)
    {
    PlayerInfo[playerid][pCrashed] = 1;
    new sendername[MAX_PLAYER_NAME],string[128];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "%s Hat ein crash", sendername);
    SendClientMessageToAll(COLOR_YELLOW, string);
    Craschlog(string);
    for(new slot = 0; slot != 12; slot++)
    {
    new wep, ammo;
    GetPlayerWeaponData(playerid, slot, wep, ammo);
    if(wep != 0 && ammo != 0)
    {
    if(PlayerInfo[playerid][pGun1] == 0) { PlayerInfo[playerid][pGun1] = wep; PlayerInfo[playerid][pAmmo1] = ammo; }
    else if(PlayerInfo[playerid][pGun2] == 0) { PlayerInfo[playerid][pGun2] = wep; PlayerInfo[playerid][pAmmo2] = ammo; }
    else if(PlayerInfo[playerid][pGun3] == 0) { PlayerInfo[playerid][pGun3] = wep; PlayerInfo[playerid][pAmmo3] = ammo; }
    else if(PlayerInfo[playerid][pGun4] == 0) { PlayerInfo[playerid][pGun4] = wep; PlayerInfo[playerid][pAmmo4] = ammo; }
    }
    }
    }

    Frage, was soll das eigentlich bringen? :D for(new slot = 0; slot != 12; slot++)

    Lösches raus:


    if(reason == 0)
    {
    PlayerInfo[playerid][pCrashed] = 1;
    new wep, ammo;
    GetPlayerWeaponData(playerid, slot, wep, ammo);
    new sendername[MAX_PLAYER_NAME],string[128];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "%s Hat ein crash", sendername);
    SendClientMessageToAll(COLOR_YELLOW, string);
    Craschlog(string);
    if(wep != 0 && ammo != 0)
    {
    if(PlayerInfo[playerid][pGun1] == 0) { PlayerInfo[playerid][pGun1] = wep; PlayerInfo[playerid][pAmmo1] = ammo; }
    else if(PlayerInfo[playerid][pGun2] == 0) { PlayerInfo[playerid][pGun2] = wep; PlayerInfo[playerid][pAmmo2] = ammo; }
    else if(PlayerInfo[playerid][pGun3] == 0) { PlayerInfo[playerid][pGun3] = wep; PlayerInfo[playerid][pAmmo3] = ammo; }
    else if(PlayerInfo[playerid][pGun4] == 0) { PlayerInfo[playerid][pGun4] = wep; PlayerInfo[playerid][pAmmo4] = ammo; }
    }
    }

    kein wunder, wenn du für for(new Max Players) machst und dann sendclient message mit i statt playerid,dann sendet der die nachricht nicht an alle spieler 1 mal sonder so oft wie alle spieler da sind also z.B 100 wegen 100 slots oder so :D
    Mach das for(new i = 0; i < MAX_PLAYERS; i++) raus und ändere SendClientMessage(i, COLOR_YELLOW, "%s Hat ein crash.");
    In:  
    format(string, sizeof(string), "%s Hat ein crash", sendername);
    SendClientMessageToAll(COLOR_YELLOW, string);

    //Edit so BraodCast brauchste nicht hast ja MessageToAll

    if(reason == 0)
    {
    PlayerInfo[playerid][pCrashed] = 1;
    for(new slot = 0; slot != 12; slot++)
    {
    new wep, ammo;
    GetPlayerWeaponData(playerid, slot, wep, ammo);
    new sendername[MAX_PLAYER_NAME],string[128];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "%s Hat ein crash", sendername);
    SendClientMessageToAll(COLOR_YELLOW, string);
    Craschlog(string);
    //BroadCast(COLOR_WHITE,string);
    if(wep != 0 && ammo != 0)
    {
    if(PlayerInfo[playerid][pGun1] == 0) { PlayerInfo[playerid][pGun1] = wep; PlayerInfo[playerid][pAmmo1] = ammo; }
    else if(PlayerInfo[playerid][pGun2] == 0) { PlayerInfo[playerid][pGun2] = wep; PlayerInfo[playerid][pAmmo2] = ammo; }
    else if(PlayerInfo[playerid][pGun3] == 0) { PlayerInfo[playerid][pGun3] = wep; PlayerInfo[playerid][pAmmo3] = ammo; }
    else if(PlayerInfo[playerid][pGun4] == 0) { PlayerInfo[playerid][pGun4] = wep; PlayerInfo[playerid][pAmmo4] = ammo; }
    }
    }
    }

    Die Funktion ist komplett unlogisch :D
    Nirgends haste was von ner ID die angezeigt werden soll definiert,und was soll admincount bringen 8|
    Kannst den nehmen, musste aber nicht ;)

    Spoiler anzeigen
    if(strcmp(cmd, "/cheater", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, 0xFF6347AA, "Benutze: /cheater [playerid] [Grund]");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    new length = strlen(cmdtext);
    while ((idx < length) && (cmdtext[idx] <= ' '))
    {
    idx++;
    }
    new offset = idx;
    new result[64];
    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
    {
    result[idx - offset] = cmdtext[idx];
    idx++;
    }
    result[idx - offset] = EOS;
    if(!strlen(result))
    {
    SendClientMessage(playerid, 0xFF6347AA, "Benutze: /cheater [playerid] [Grund]");
    return 1;
    }
    for(new i=0;i<MAX_PLAYERS;i++)
    {
    if (PlayerInfo[i][pAdmin] >= 100)
    {
    format(string, sizeof(string), "Cheater Report: %s wird von %s verdächtigt, Grund: %s", giveplayer, sendername, (result));
    SendClientMessage(i, 0xFF6347AA, string);
    return 1;
    }
    }
    }
    }
    else
    {
    SendClientMessage(playerid, 0xFF6347AA, "Error: Spieler nicht gefunden!");
    return 1;
    }
    }
    return 1;
    }

    Machste einfach z.B
    if(strcmp(cmd, "/play", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerToPoint(10.0,playerid, X,Y,Z))//Der Anlage
    {
    new Float:px,Float:py,Float:pz;
    GetPlayerPos(playerid, px, py, pz);
    PlayerPlaySound(playerid,/*SoundID # */,px,py,pz);
    return 1;
    }
    else
    {
    SendClientMessage(playerid,0xFF6347AA,"Du bist nicht bei der Anlage!");
    return 1;
    }
    }
    }
    # Sound ID's gibts >>>Hier<<<