Beiträge von xNait aka. NIKEiD2.0

    Hi,
    Ich habe ein Problem mit diesen beiden Befehlen /gov und /ticket.
    Ich habe nichts daran geändert aber sobald ich Ingame den Befehl nutze steht da : Du bist kein Behördler.
    Obwohl ich eine bin :).


    Kann mir vielleicht jemand helfen.


    if(strcmp(cmd, "/government", true) == 0 || strcmp(cmd, "/gov", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) { SendClientMessage(playerid, COLOR_GREY, " Du bist kein Behördler !"); return 1; } if(PlayerInfo[playerid][pRank] < 5) { SendClientMessage(playerid, COLOR_GREY, " You need to be Rank 5 to be able to use this !"); return 1; } 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, COLOR_GRAD2, "USAGE: (/gov)ernment [text]"); return 1; } SendClientMessageToAll(COLOR_WHITE, "|___________ Staatliche Durchsage ___________|"); format(string, sizeof(string), "Officer %s: %s", sendername, result); SendClientMessageToAll(COLOR_DBLUE, string); } return 1; }


    http://pastebin.de/17954



    if(strcmp(cmd, "/ticket", true) == 0) { if(IsPlayerConnected(playerid)) { if(gTeam[playerid] != 2 || IsACop(playerid)) { SendClientMessage(playerid, COLOR_GREY, " Du bist kein Behördler!"); return 1; } if(OnDuty[playerid] != 1 && PlayerInfo[playerid][pMember] == 1) { SendClientMessage(playerid, COLOR_GREY, " You are not on Duty!"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /ticket [playerid/PartOfName] [price] [Grund]"); return 1; } giveplayerid = ReturnUser(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /ticket [playerid/PartOfName] [price] [Grund]"); return 1; } moneys = strval(tmp); if(moneys < 1 || moneys > 99999) { SendClientMessage(playerid, COLOR_GREY, " Ticket Money can't be below 1 or higher then 99999 !"); return 1; } if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if (ProxDetectorS(8.0, playerid, giveplayerid)) { 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, COLOR_GRAD2, "Benutze: /ticket [playerid/PartOfName] [price] [Grund]"); return 1; } format(string, sizeof(string), "* You gave %s a Ticket costing $%d, reason: %s", giveplayer, moneys, (result)); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* Officer %s has given you a Ticket costing $%d, reason: %s", sendername, moneys, (result)); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, "* Type /accept ticket, to accept it."); TicketOffer[giveplayerid] = playerid; TicketMoney[giveplayerid] = moneys; return 1; } else { SendClientMessage(playerid, COLOR_GREY, " Der Spieler ist nicht in deiner Nähe !"); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " Der Spieler ist Offline !"); return 1; } } return 1; }


    http://pastebin.de/17955

    Ich habe diesen Code für diese Autosorte angepasst : Premier


    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    new LightOn;
    new alarm;
    new alarm2;
    new Float:x,Float:y,Float:z;


    if(newkeys & KEY_CROUCH)
    {
    if(IsPlayerInAnyVehicle(playerid))
    {
    if(LightOn == 0)
    {
    alarm = CreateObject(18646,x,y,z,0,0,0,283); //die 1. neonröhre
    AttachObjectToVehicle(alarm, GetPlayerVehicleID(playerid), -0.45,-0.2,0.93,0.77,0,0); //das ist die eine seite
    LightOn = 1;
    }
    else if(LightOn == 1)
    {
    DestroyObject(alarm);
    DestroyObject(alarm2);
    SendClientMessage(playerid, COLOR_GREEN, "Licht demontiert.");
    LightOn = 0;
    }
    }
    }
    return 1;
    }



    Jetzt ist die Frage wie ich im Script einstelle, dass es nur für bestimmte Cars geht. Das soll heißen das es nur für FBI Premiers gehen soll. ?? Wo muss ich es einfügen ??


    Danke im vorraus :D