Beiträge von unknown5724

    nein du musst noch ein komma setzen, war zumindest bei mir so


    CreatePickup(1318, 23, 928.9160,-1353.0472,13.3438, -1);


    AddStaticPickup(1239, 23, 1571.9191,-1335.3265,16.4844, -1);

    Hi,
    ich hab ein riesen Problem wenn sich jemand auf meinem Server registriert und als Geburtsdatum 11/11/1111111111111111 oder so eingibt kann niemand mehr einen Befehl ausführen und dann kommt immer ,,Server: Unkown Command´´.
    Ich brauche ganz dringend Hilfe! Ich hoffe ihr könnt mir helfen!


    Schonmal danke im vorraus!


    MfG Coca_Cola

    Hi,


    such mal nach:


    public SetPlayerSpawn(playerid)


    dann kannst du für die cops z.b. das darunter machen:


    if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)//Das ist jetzt die Cop Faction
    {
    SetPlayerPos(playerid, 1528.0634,-1677.8179,5.8906);// Die Spawnkords (LSPD Garage)
    SetPlayerFacingAngle(playerid, 268.6737);//Wohin der Spieler guckt
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    return 1;
    }

    Hi,


    Hier hast du es:


    forward OnPlayerKeyStateChange(playerid, newkeys, oldkeys);


    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    if((newkeys==KEY_ACTION)&&(IsPlayerInAnyVehicle(playerid))&&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER))
    {
    if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 525)// Das is die Carid von dem Towtruck
    {
    new Float:pX,Float:pY,Float:pZ;
    GetPlayerPos(playerid,pX,pY,pZ);
    new Float:vX,Float:vY,Float:vZ;
    new Found=0;
    new vid=0;
    while((vid<MAX_VEHICLES)&&(!Found))
    {
    vid++;
    GetVehiclePos(vid,vX,vY,vZ);
    if ((floatabs(pX-vX)<7.0)&&(floatabs(pY-vY)<7.0)&&(floatabs(pZ-vZ)<7.0)&&(vid!=GetPlayerVehicleID(playerid)))
    {
    Found=1;
    if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
    {
    DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
    }
    AttachTrailerToVehicle(vid,GetPlayerVehicleID(playerid));
    }
    }
    if (!Found)
    {
    SendClientMessage(playerid,COLOR_GRAD1," You are too far away from a Car!");
    }
    }
    }
    }


    Kann sein das ich iwo was vergessen hab. Wenn es nich funzt sag nochma bescheid dann guck alle im Script durch.


    //edit Tow Truck is doch nur das Fahrzeug ohne die STRG Funktion

    gTeam[playerid] == 2???? Das sind die Cops bei mir. Ich möchte das nur der Haus Besitzer und Mieter das House Car fahren können.


    Oder ich versteh nich ganz was du mit gTeam[playerid] == 2 meinst

    Hi,
    bei mir is es im mom so, dass wenn ein House Car nich abgeschlossen is, dass jeder es fahren kann. Ich hab schon probiert das hin zu bekommen das nur der Haus Besitzer und die Mieter es fahren können, was aber nich geklappt hat.
    Hat einer ne idee wie ich das hinbekomme?


    Schonmal Danke im vorraus!!!

    ich habs jetzt mal eben schnell gemacht. habs nich getestet. kann sein das noch was falsch is.


    public PayDay()
    {
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pMember] == 19 || PlayerInfo[i][pLeader] == 1 || PlayerInfo[i][pLeader] == 19)
    {
    if(PlayerInfo[i][pRank] <= 1)
    {
    PlayerMoney[i] = PlayerMoney[i] +1000;
    return 1;
    }
    if(PlayerInfo[i][pRank] == 2)
    {
    PlayerMoney[i] = PlayerMoney[i] +1500;
    return 1;
    }
    if(PlayerInfo[i][pRank] == 3)
    {
    PlayerMoney[i] = PlayerMoney[i] +2000;
    return 1;
    }
    if(PlayerInfo[i][pRank] == 4)
    {
    PlayerMoney[i] = PlayerMoney[i] +2500;
    return 1;
    }
    if(PlayerInfo[i][pRank] == 5)
    {
    PlayerMoney[i] = PlayerMoney[i] +3000;
    return 1;
    }
    if(PlayerInfo[i][pRank] == 6)
    {
    PlayerMoney[i] = PlayerMoney[i] +3500;
    return 1;
    }
    }
    if(PlayerInfo[i][pMember] == 2 || PlayerInfo[i][pMember] == 12 || PlayerInfo[i][pLeader] == 2 || PlayerInfo[i][pLeader] == 12)
    {
    if(PlayerInfo[i][pRank] <= 1)
    {
    PlayerMoney[i] = PlayerMoney[i] +1500;
    return 1;
    }
    if(PlayerInfo[i][pRank] == 2)
    {
    PlayerMoney[i] = PlayerMoney[i] +2000;
    return 1;
    }
    if(PlayerInfo[i][pRank] == 3)
    {
    PlayerMoney[i] = PlayerMoney[i] +2500;
    return 1;
    }
    if(PlayerInfo[i][pRank] == 4)
    {
    PlayerMoney[i] = PlayerMoney[i] +3000;
    return 1;
    }
    if(PlayerInfo[i][pRank] == 5)
    {
    PlayerMoney[i] = PlayerMoney[i] +3500;
    return 1;
    }
    if(PlayerInfo[i][pRank] == 6)
    {
    PlayerMoney[i] = PlayerMoney[i] +4000;
    return 1;
    }
    }
    if(PlayerInfo[i][pMember] == 3 || PlayerInfo[i][pMember] == 18 || PlayerInfo[i][pLeader] == 18 || PlayerInfo[i][pLeader] == 2)
    {
    if(PlayerInfo[i][pRank] <= 1)
    {
    PlayerMoney[i] = PlayerMoney[i] +2000;
    return 1;
    }
    if(PlayerInfo[i][pRank] == 2)
    {
    PlayerMoney[i] = PlayerMoney[i] +2500;
    return 1;
    }
    if(PlayerInfo[i][pRank] == 3)
    {
    PlayerMoney[i] = PlayerMoney[i] +3000;
    return 1;
    }
    if(PlayerInfo[i][pRank] == 4)
    {
    PlayerMoney[i] = PlayerMoney[i] +3500;
    return 1;
    }
    if(PlayerInfo[i][pRank] == 5)
    {
    PlayerMoney[i] = PlayerMoney[i] +4000;
    return 1;
    }
    if(PlayerInfo[i][pRank] == 6)
    {
    PlayerMoney[i] = PlayerMoney[i] +4500;
    return 1;
    }
    }
    if(IsaMember(i))
    {
    if(PlayerInfo[i][pRank] <= 1)
    {
    PlayerMoney[i] = PlayerMoney[i] +2000;
    return 1;
    }
    if(PlayerInfo[i][pRank] == 2)
    {
    PlayerMoney[i] = PlayerMoney[i] +2500;
    return 1;
    }
    if(PlayerInfo[i][pRank] == 3)
    {
    PlayerMoney[i] = PlayerMoney[i] +3000;
    return 1;
    }
    if(PlayerInfo[i][pRank] == 4)
    {
    PlayerMoney[i] = PlayerMoney[i] +3500;
    return 1;
    }
    if(PlayerInfo[i][pRank] == 5)
    {
    PlayerMoney[i] = PlayerMoney[i] +4000;
    return 1;
    }
    if(PlayerInfo[i][pRank] == 6)
    {
    PlayerMoney[i] = PlayerMoney[i] +4500;
    return 1;
    }
    if(PlayerInfo[i][pLeader] == 7)
    {
    PlayerMoney[i] = PlayerMoney[i] +8000;
    return 1;
    }
    }
    if(PlayerInfo[i][pMember] == 9 || PlayerInfo[i][pMember] == 10 || PlayerInfo[i][pLeader] == 10 || PlayerInfo[i][pLeader] == 9 || PlayerInfo[i][pMember] == 4 || PlayerInfo[i][pLeader] == 4)
    {
    if(PlayerInfo[i][pRank] <= 1)
    {
    PlayerMoney[i] = PlayerMoney[i] +0;
    return 1;
    }
    if(PlayerInfo[i][pRank] == 2)
    {
    PlayerMoney[i] = PlayerMoney[i] +1200;
    return 1;
    }
    if(PlayerInfo[i][pRank] == 3)
    {
    PlayerMoney[i] = PlayerMoney[i] +1400;
    return 1;
    }
    if(PlayerInfo[i][pRank] == 4)
    {
    PlayerMoney[i] = PlayerMoney[i] +1600;
    return 1;
    }
    if(PlayerInfo[i][pRank] == 5)
    {
    PlayerMoney[i] = PlayerMoney[i] +1800;
    return 1;
    }
    if(PlayerInfo[i][pRank] == 6)
    {
    PlayerMoney[i] = PlayerMoney[i] +2000;
    return 1;
    }
    }
    }
    return 1;
    }
    }

    Hi,
    ich glaub das musst du so machen:
    such mal nach:
    public CheckGas()
    {
    new string[256];
    for(new i=0;i<MAX_PLAYERS;i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
    {
    new vehicle = GetPlayerVehicleID(i);
    if(Gas[vehicle] >= 1)
    {
    if(Gas[vehicle] <= 10) { PlayerPlaySound(i, 1085, 0.0, 0.0, 0.0); }
    if(gGas[i] == 1) {
    format(string, sizeof(string), "~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Fuel:~w~ %d%",Gas[vehicle]);
    GameTextForPlayer(i,string,15500,3); }
    if(IsAPlane(vehicle) || IsABoat(vehicle)) { Gas[vehicle]++; } // hier kannst einstellen was keinen sprit braucht
    Gas[vehicle]--;
    }
    else
    {
    NoFuel[i] = 1;
    TogglePlayerControllable(i, 0);
    GameTextForPlayer(i,"~w~~n~~n~~n~~n~~n~~n~~n~~n~No fuel in Vehicle~n~Use /exit to leave the vehicle",1500,3);
    }
    }
    }
    }
    return 1;
    }