[SAMMELTHREAD] Kleine Scripting Fragen

Dein Problem konnte durch einen User gelöst werden? Bedank dich bei ihm indem du seinen Beitrag als Hilfreich markierst sowie einen Daumen oben dalässt
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
  • Kann mir Jemand helfen :=)


    So:


    //oben im Script
    new pickup, pickup1;


    //Bei OnGameModeInit
    SetTimer("Zwaffen", 1000*60*30, 0);


    //Der Callback
    forward Zwaffen();
    public Zwaffen()
    {
    pickup = AddStaticPickup(324, 2, X, Y, Z);//X,Y,Z unten lesen
    pickup1 = AddStaticPickup(324, 2, X, Y, Z); //X,Y,Z unten lesen
    return 1;
    }


    //Weiter
    public OnPlayerPickUpPickup(playerid, pickupid)
    {
    if(pickupid == pickup)
    {
    GivePlayerWeapon(playerid, 24, random(700));
    SetTimer("Zwaffen", 1000*60*30, 0);
    }
    else if(pickupid == pickup1)
    {
    GivePlayerWeapon(playerid, 24, random(700));
    SetTimer("Zwaffen", 1000*60*30, 0);
    }
    return 1;
    }


    Aus dem Kopf geschrieben, denke aber könnte gehen ^^


    und was die X,Y,Z Koordinaten betreffen, lese es bitte nach:


    random


    mfg. :thumbup:

    ast2ufdyxkb1.png


    Leute, lernt scripten und versucht mal lieber etwas selber zu schreiben, als es aus einem GF zu kopieren. :S

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • Zeile 18312
    if(dini_Int(tbDir,"fbTime")+dini_Int(tbDir,"fbDuration") > Time())


    Zeile 18314
    new sekki=(dini_Int(tbDir,"fbTime")+dini_Int(tbDir,"fbDuration"))-Time(),minni=sekki/60;


    Zeile 61756
    dini_IntSet(tbDir,"fbTime",Time());


    Sind 3 Zeilen also 3 Errors :|

    Sponsoring4All - Administrator
    -- RIP S4A --

  • Wenn es eine inlude ist, muss die auch im Include Ordner sein. Schau doch mal in die Include rein ob da überhaupt so eine Funktion existiert. Sollte das der Fall sein, kannst du den Include ja rauswerfen und die Funktion in dein Script einbauen.

  • Hagi:
    new VehicleNames[212][] = {
    "Landstalker","Bravura","Buffalo","Linerunner","Perrenial","Sentinel",
    "Dumper","Firetruck","Trashmaster","Stretch","Manana","Infernus","Voodoo",
    "Pony","Mule","Cheetah","Ambulance","Leviathan","Moonbeam","Esperanto","Taxi",
    "Washington","Bobcat","Mr. Whoopee","BF. Injection","Hunter","Premier","Enforcer",
    "Securicar","Banshee","Predator","Bus","Rhino","Barracks","Hotknife","Article Trailer",
    "Previon","Coach","Cabbie","Stallion","Rumpo","RC Bandit","Romero","Packer","Monster",
    "Admiral","Squalo","Seasparrow","Pizzaboy","Tram","Article Trailer 2","Turismo","Speeder",
    "Reefer","Tropic","Flatbed","Yankee","Caddy","Solair","Berkley's RC Van","Skimmer",
    "PCJ-600","Faggio","Freeway","RC Baron","RC Raider","Glendale","Oceanic","Sanchez",
    "Sparrow","Patriot","Quad","Coastguard","Dinghy","Hermes","Sabre","Rustler","ZR-350",
    "Walton","Regina","Comet","BMX","Burrito","Camper","Marquis","Baggage","Dozer",
    "Maverick","News Chopper","Rancher","FBI Rancher","Virgo","Greenwood","Jetmax","Hotring",
    "Sandking","Blista Compact","Police Maverick","Boxville","Benson","Mesa","RC Goblin",
    "Hotring Racer A","Hotring Racer B","Bloodring Banger","Rancher","Super GT","Elegant",
    "Journey","Bike","Mountain Bike","Beagle","Cropdust","Stunt","Tanker","Roadtrain",
    "Nebula","Majestic","Buccaneer","Shamal","Hydra","FCR-900","NRG-500","HPV1000",
    "Cement Truck","Tow Truck","Fortune","Cadrona","FBI Truck","Willard","Forklift",
    "Tractor","Combine","Feltzer","Remington","Slamvan","Blade","Freight","Streak",
    "Vortex","Vincent","Bullet","Clover","Sadler","Firetruck LA","Hustler","Intruder",
    "Primo","Cargobob","Tampa","Sunrise","Merit","Utility","Nevada","Yosemite","Windsor",
    "Monster A","Monster B","Uranus","Jester","Sultan","Stratum","Elegy","Raindance",
    "RC Tiger","Flash","Tahoma","Savanna","Bandito","Freight Flat","Streak Carriage",
    "Kart","Mower","Dunerider","Sweeper","Broadway","Tornado","AT-400","DFT-30","Huntley",
    "Stafford","BF-400","Newsvan","Tug","Article Trailer 3","Emperor","Wayfarer","Euros","Mobile Hotdog",
    "Club","Freight Carriage","Trailer 3","Andromada","Dodo","RC Cam","Launch","Police Car (LSPD)",
    "Police Car (SFPD)","Police Car (LVPD)","Police Ranger","Picador","S.W.A.T Van","Alpha",
    "Phoenix","Glendale","Sadler","Luggage Trailer A","Luggage Trailer B","Stair Trailer",
    "Boxville","Farm Plow","Utility Trailer"
    };
    Modellname= ModellID-400
    z.B.
    VehicleNames[GetVehicleModel(vehicleid)-400)]

  • Wie kann ma einn PVarInt mal nehmen, und das dann als Geld auszahlen lassen?
    Ich habe es zurzeit so :

    GivePlayerMoney(playerid,GetPVarInt(playerid,"fische",*2.55)); //Zeile 796



    und die errors

    Code
    D:\window 0.3e\samp03e_svr_win32\gamemodes\Bla.pwn(796) : error 029: invalid expression, assumed zero
    D:\window 0.3e\samp03e_svr_win32\gamemodes\Bla.pwn(796) : warning 215: expression has no effect
    D:\window 0.3e\samp03e_svr_win32\gamemodes\Bla.pwn(796) : error 001: expected token: ";", but found ")"
    D:\window 0.3e\samp03e_svr_win32\gamemodes\Bla.pwn(796) : error 029: invalid expression, assumed zero
    D:\window 0.3e\samp03e_svr_win32\gamemodes\Bla.pwn(796) : fatal error 107: too many error messages on one line
  • Wie Kann man etwas mit einem Enum + nehmen?
    Mit PVarInt habe ich es zurzeit so: hätte es aber gerne mit nem Enum

    SetPVarInt(playerid,"ExpFischer",GetPVarInt(playerid,"ExpFischer") + xpfischer);

    Enum ist so aufgebaut
    enum SInfo
    {
    ...,
    ...,
    ExpFischer,
    ...
    }
    new SpielerInfo[MAX_PLAYERS][SInfo];

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen