XGF - Drive-In

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Moin Moin! ich mal wieder xD


    Ich wollte fragen ob mir jemand ein Drive In machen könnte


    Also man geht zum BSN am rand da und dan ist da n Check point
    und da steht dan wenn man drinne ist:


    Wenn du essen möchtest, dn warte noch bitte einen moment...
    und dan nach 5 Sekunden oder so ist Leben Voll.


    Wäre nett wenn das jemand machen könnte ^^


    Kosten: 20 $

  • Ok also ich habe mal eins gemacht ...
    Die user sind damit echt zufrieden es geht schnell und is nichtaufwenig wegen menü und so.


    Also hier


    GAnz oben
    forward IsAtBsn(playerid);


    Einfach nach ganz unten
    public IsAtBsn(playerid)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerToPoint(6.0,playerid,1182.2661,-900.0391,43.2836) || PlayerToPoint(6.0,playerid,800.7855,-1629.1942,13.3828))
    {//In grove street bar (with girlfriend), and in Havanna
    return 1;
    }
    else if(PlayerToPoint(6.0,playerid,1888.4779,2087.6147,11.0625) || PlayerToPoint(6.0,playerid,2485.0847,2022.9994,10.8203))
    {//PIG Pen
    return 1;
    }
    else if(PlayerToPoint(6.0,playerid,2157.1809,2808.1702,10.5254) || PlayerToPoint(6.0,playerid,2158.7366,2808.9082,10.8203))
    {//Evo Bar
    return 1;
    }
    else if(PlayerToPoint(6.0,playerid,-2347.9741,-145.8479,35.3203) || PlayerToPoint(6.0,playerid,-2343.0300,1020.2639,50.5209))
    {//Evo Bar
    return 1;
    }
    }
    return 0;
    }


    Dann hier den befehl mit /food


    if(strcmp(cmd, "/food", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(IsAtBsn(playerid))
    {
    if(PlayerDrunk[playerid] < 10)
    {
    if(!IsPlayerInAnyVehicle(playerid))
    {
    SendClientMessage(playerid, COLOR_WHITE, "BS: Dies ist ein Drivein. Und Daher nur für Fahrzeuge gedacht!");
    return 1;
    }
    new Float:health;
    new x_nr[256];
    x_nr = strtok(cmdtext, idx);
    if(!strlen(x_nr)) {
    SendClientMessage(playerid, COLOR_WHITE, "|__________________ DriveIn __________________|");
    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /food[name]");
    SendClientMessage(playerid, COLOR_GREY, "Verfügbar: Cheeseburger ($6), McChicken ($10), BigMac ($10), Pommes ($2), Cola($2)");
    SendClientMessage(playerid, COLOR_WHITE, "|________________________________________________|");
    return 1;
    }
    if(strcmp(x_nr,"cheeseburger",true) == 0)
    {
    GivePlayerMoney(playerid, - 6);
    if(PlayerDrunk[playerid] >= 5) { GameTextForPlayer(playerid, "~w~You are~n~~p~Drunk", 3500, 1); }
    if(GetPlayerHealth(playerid, health) < 100)
    {
    if(PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 15; SetPlayerHealth(playerid, health + hp); }
    else { SetPlayerHealth(playerid, health + 15.0); }
    }
    }
    else if(strcmp(x_nr,"mcchicken",true) == 0)
    {
    GivePlayerMoney(playerid, - 10);
    if(PlayerDrunk[playerid] >= 5) { GameTextForPlayer(playerid, "~w~You are~n~~p~Drunk", 3500, 1); }
    if(GetPlayerHealth(playerid, health) < 100)
    {
    if(PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 25; SetPlayerHealth(playerid, health + hp); }
    else { SetPlayerHealth(playerid, health + 25.0); }
    }
    }
    else if(strcmp(x_nr,"bigmac",true) == 0)
    {
    GivePlayerMoney(playerid, - 10);
    if(PlayerDrunk[playerid] >= 5) { GameTextForPlayer(playerid, "~w~Du bist~n~~pBesoffen", 3500, 1); }
    if(GetPlayerHealth(playerid, health) < 100)
    {
    if(PlayerInfo[playerid][pAlcoholPerk] > 0) { PlayerDrunk[playerid] += 1; new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 27; SetPlayerHealth(playerid, health + hp); }
    else { SetPlayerHealth(playerid, health + 27.0); }
    }
    }
    else if(strcmp(x_nr,"pommes",true) == 0)
    {
    GivePlayerMoney(playerid, - 2);
    if(GetPlayerHealth(playerid, health) < 100)
    {
    if(PlayerInfo[playerid][pAlcoholPerk] > 0) { new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 5; SetPlayerHealth(playerid, health + hp); }
    else { SetPlayerHealth(playerid, health + 5.0); }
    }
    }
    else if(strcmp(x_nr,"cola",true) == 0)
    {
    GivePlayerMoney(playerid, - 2);
    if(GetPlayerHealth(playerid, health) < 100)
    {
    if(PlayerInfo[playerid][pAlcoholPerk] > 0) { new hp = 2 * PlayerInfo[playerid][pAlcoholPerk]; hp += 5; SetPlayerHealth(playerid, health + hp); }
    else { SetPlayerHealth(playerid, health + 5.0); }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_WHITE, "BSN: Das kennen wir nicht.");
    return 1;
    }
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "* %s nimmt einen %s.", sendername ,x_nr);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Du kannst nicht noch mehr essen !");
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Du bist an keinem Burgershot!");
    return 1;
    }
    }
    return 1;
    }


    Und dies hier noch bei


    public CustomPickups()


    das einfügen


    else if (PlayerToPoint(5.0, i, 1182.2661,-900.0391,43.2836))
    {
    GameTextForPlayer(i, "~w~Gib ~r~/food~y~~n~Um etwas zu Essen ein!", 3000, 3);
    }
    else if (PlayerToPoint(5.0, i, 800.7855,-1629.1942,13.3828))
    {
    GameTextForPlayer(i, "~w~Gib ~r~/food~y~~n~Um etwas zu Essen ein!", 3000, 3);
    }
    else if (PlayerToPoint(5.0, i, 1888.4779,2087.6147,11.0625))
    {
    GameTextForPlayer(i, "~w~Gib ~r~/food~y~~n~Um etwas zu Essen ein!", 3000, 3);
    }
    else if (PlayerToPoint(5.0, i, -2343.0300,1020.2639,50.5209))
    {
    GameTextForPlayer(i, "~w~Gib ~r~/food~y~~n~Um etwas zu Essen ein!", 3000, 3);
    }
    else if (PlayerToPoint(5.0, i, 2485.0847,2022.9994,10.8203))
    {
    GameTextForPlayer(i, "~w~Gib ~r~/food~y~~n~Um etwas zu Essen ein!", 3000, 3);
    }
    else if (PlayerToPoint(5.0, i, 2157.1809,2808.1702,10.5254))
    {
    GameTextForPlayer(i, "~w~Gib ~r~/food~y~~n~Um etwas zu Essen ein!", 3000, 3);
    }
    else if (PlayerToPoint(5.0, i, 2158.7366,2808.9082,10.8203))
    {
    GameTextForPlayer(i, "~w~Gib ~r~/food~y~~n~Um etwas zu Essen ein!", 3000, 3);
    }
    else if (PlayerToPoint(5.0, i, -2347.9741,-145.8479,35.3203))
    {
    GameTextForPlayer(i, "~w~Gib ~r~/food~y~~n~Um etwas zu Essen ein!", 3000, 3);
    }


    Ich hoffe ich konnte helfen

  • Sieht nice aus ^^
    Aber....


    Errors :x


    E:\GTA San Andreas\Neuer Ordner\GTA_SA\Server\gamemodes\xgf.pwn(211) : warning 201: redefinition of constant/macro (symbol "COLOR_PURPLE")
    E:\GTA San Andreas\Neuer Ordner\GTA_SA\Server\gamemodes\xgf.pwn(8346) : error 029: invalid expression, assumed zero
    E:\GTA San Andreas\Neuer Ordner\GTA_SA\Server\gamemodes\xgf.pwn(8346) : warning 215: expression has no effect
    E:\GTA San Andreas\Neuer Ordner\GTA_SA\Server\gamemodes\xgf.pwn(8346) : error 001: expected token: ";", but found "if"
    E:\GTA San Andreas\Neuer Ordner\GTA_SA\Server\gamemodes\xgf.pwn(8350) : error 010: invalid function or declaration
    E:\GTA San Andreas\Neuer Ordner\GTA_SA\Server\gamemodes\xgf.pwn(8354) : error 010: invalid function or declaration
    E:\GTA San Andreas\Neuer Ordner\GTA_SA\Server\gamemodes\xgf.pwn(8358) : error 010: invalid function or declaration
    E:\GTA San Andreas\Neuer Ordner\GTA_SA\Server\gamemodes\xgf.pwn(8362) : error 010: invalid function or declaration
    E:\GTA San Andreas\Neuer Ordner\GTA_SA\Server\gamemodes\xgf.pwn(8366) : error 010: invalid function or declaration
    E:\GTA San Andreas\Neuer Ordner\GTA_SA\Server\gamemodes\xgf.pwn(8370) : error 010: invalid function or declaration
    E:\GTA San Andreas\Neuer Ordner\GTA_SA\Server\gamemodes\xgf.pwn(8374) : error 010: invalid function or declaration
    E:\GTA San Andreas\Neuer Ordner\GTA_SA\Server\gamemodes\xgf.pwn(10025) : warning 219: local variable "string" shadows a variable at a preceding level
    E:\GTA San Andreas\Neuer Ordner\GTA_SA\Server\gamemodes\xgf.pwn(19791) : warning 202: number of arguments does not match definition
    E:\GTA San Andreas\Neuer Ordner\GTA_SA\Server\gamemodes\xgf.pwn(29002) : error 021: symbol already defined: "CustomPickups"
    E:\GTA San Andreas\Neuer Ordner\GTA_SA\Server\gamemodes\xgf.pwn(30706) : warning 203: symbol is never used: "gehalt"
    E:\GTA San Andreas\Neuer Ordner\GTA_SA\Server\gamemodes\xgf.pwn(7487) : warning 204: symbol is assigned a value that is never used: "s1a"
    E:\GTA San Andreas\Neuer Ordner\GTA_SA\Server\gamemodes\xgf.pwn(7486) : warning 204: symbol is assigned a value that is never used: "s1e"
    E:\GTA San Andreas\Neuer Ordner\GTA_SA\Server\gamemodes\xgf.pwn(7488) : warning 204: symbol is assigned a value that is never used: "s1i"
    E:\GTA San Andreas\Neuer Ordner\GTA_SA\Server\gamemodes\xgf.pwn(7484) : warning 204: symbol is assigned a value that is never used: "s2a"
    E:\GTA San Andreas\Neuer Ordner\GTA_SA\Server\gamemodes\xgf.pwn(7483) : warning 204: symbol is assigned a value that is never used: "s2e"
    E:\GTA San Andreas\Neuer Ordner\GTA_SA\Server\gamemodes\xgf.pwn(7485) : warning 204: symbol is assigned a value that is never used: "s2i"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    10 Errors.