Scripthilfe bitte (leicht)

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
  • wie bekomme ich das:
    public OnPlayerCommandText(playerid, cmdtext[])
    {
    dcmd(id,2,cmdtext);
    dcmd(info,4, cmdtext);
    dcmd(gcommands,9, cmdtext);
    dcmd(stats,5,cmdtext);
    dcmd(report,6,cmdtext);
    dcmd(tuner,5,cmdtext);
    dcmd(loc,3,cmdtext);
    dcmd(votekick,8,cmdtext);
    dcmd(voteban,7,cmdtext);
    dcmd(votelist,8,cmdtext);
    #if defined BASIC_COMMANDS
    dcmd(players,7, cmdtext);
    dcmd(clock,5,cmdtext);
    dcmd(date,4,cmdtext);
    dcmd(pos,3,cmdtext);
    dcmd(me,2,cmdtext);
    dcmd(kill,4,cmdtext);
    dcmd(givemoney,9,cmdtext);
    #endif
    #if defined EXTRA_COMMANDS
    dcmd(bank,4,cmdtext);
    dcmd(withdraw,8,cmdtext);
    dcmd(para,4,cmdtext);
    dcmd(hitman,6,cmdtext);
    dcmd(bounty,6,cmdtext);
    #endif
    #if defined LOCK_MODE
    dcmd(lock,4,cmdtext);
    dcmd(unlock,6,cmdtext);
    #endif
    #if defined DISPLAY_MODE
    dcmd(speedo,6,cmdtext);
    dcmd(speedotype,10,cmdtext);
    #endif
    //Admin Part
    #if defined GREGISTER
    dcmd(gregister,9,cmdtext);
    dcmd(glogin,6,cmdtext);
    dcmd(gchangepw,9,cmdtext);
    #else
    dcmd(register,8,cmdtext);
    dcmd(login,5,cmdtext);
    dcmd(changepw,8,cmdtext);
    #endif
    dcmd(data,4,cmdtext);
    dcmd(admins,6,cmdtext);
    dcmd(ahelp,5,cmdtext);
    dcmd(kick,4,cmdtext);
    dcmd(fake,4,cmdtext);
    dcmd(heal,4,cmdtext);
    dcmd(sethealth,9,cmdtext);
    dcmd(slap,4,cmdtext);
    dcmd(freeze,6,cmdtext);
    dcmd(unfreeze,8,cmdtext);
    dcmd(gravity,7,cmdtext);
    dcmd(ip,2,cmdtext);
    dcmd(ban,3,cmdtext);
    dcmd(goto,4,cmdtext);
    dcmd(mute,4,cmdtext);
    dcmd(unmute,6,cmdtext);
    dcmd(akill,5,cmdtext);
    dcmd(get,3,cmdtext);
    dcmd(jail,4,cmdtext);
    dcmd(unjail,6,cmdtext);
    dcmd(time,4,cmdtext);
    dcmd(announce,8,cmdtext);
    dcmd(ann,3,cmdtext);
    dcmd(addblack,8,cmdtext);
    dcmd(addwhite,8,cmdtext);
    dcmd(addclan,7,cmdtext);
    dcmd(banip,5,cmdtext);
    dcmd(nick,4,cmdtext);
    dcmd(countdown,9,cmdtext);
    dcmd(reloadcfg,9,cmdtext);
    dcmd(reloadfs,8,cmdtext);
    dcmd(reloadbans,10,cmdtext);
    dcmd(allmoney,8,cmdtext);
    dcmd(givecash,8,cmdtext);
    dcmd(setmoney,8,cmdtext);
    dcmd(setadmin,8,cmdtext);
    dcmd(armor,5,cmdtext);
    dcmd(armour,6,cmdtext);
    dcmd(giveweapon,10,cmdtext);
    dcmd(a,1,cmdtext);


    dcmd(sun,3,cmdtext);
    dcmd(cloud,5,cmdtext);
    dcmd(sandstorm,9,cmdtext);
    dcmd(fog,3,cmdtext);
    dcmd(rain,4,cmdtext);


    dcmd(ammu,4,cmdtext);
    dcmd(weather,7,cmdtext);
    dcmd(disarm,6,cmdtext);
    dcmd(numberplate,11,cmdtext);
    dcmd(allheal,7,cmdtext);
    dcmd(resetmoney,10,cmdtext);
    dcmd(clear,5,cmdtext);
    dcmd(say,3,cmdtext);
    dcmd(vr,2,cmdtext);
    dcmd(flip,4,cmdtext);
    dcmd(whitelist,9,cmdtext);
    dcmd(blacklist,9,cmdtext);
    dcmd(clanblacklist,13,cmdtext);
    dcmd(v,1,cmdtext);
    dcmd(skin,4,cmdtext);
    dcmd(bomb,4,cmdtext);
    dcmd(setscore,8,cmdtext);
    dcmd(vcolor,6,cmdtext);
    dcmd(noon,4,cmdtext);
    dcmd(night,5,cmdtext);
    dcmd(morning,7,cmdtext);
    dcmd(day,3,cmdtext);
    #if defined SPECTATE_MODE
    dcmd(spec,4,cmdtext);
    #endif
    dcmd(fuckup,6,cmdtext);
    dcmd(force,5,cmdtext);
    dcmd(ejet,4,cmdtext);
    #if defined LOCK_MODE
    dcmd(xunlock,7,cmdtext);
    #endif
    dcmd(gsave,5,cmdtext);
    dcmd(back,4,cmdtext);
    dcmd(gmenu,5,cmdtext);
    dcmd(setvip,6,cmdtext);
    dcmd(delvip,6,cmdtext);
    dcmd(teleport,8,cmdtext);
    dcmd(givearmor,9,cmdtext);
    dcmd(givearmour,10,cmdtext);
    dcmd(giveskin,8,cmdtext);
    dcmd(jetpack,7,cmdtext);
    dcmd(god,3,cmdtext);
    dcmd(alldisarm,9,cmdtext);
    dcmd(lockchat,8,cmdtext);
    return 0;
    }
    #if defined LOCK_MODE
    public CheckLock() {
    for(new i=1;i<MAX_VEHICLES;i++) {
    if(VehicleInfo[i][LockCar]) {
    if(!IsVehicleInUse(i)) {
    VehicleInfo[i][LockCount]--;
    if(VehicleInfo[i][LockCount]==0) {
    UnlockCar(i);
    }
    }
    }
    }
    return 1;
    }
    und das:
    static gTeam[MAX_PLAYERS];


    #define TEAM_GROVE 0
    #define TEAM_BALLAS 1
    #define TEAM_COPS 2



    public OnPlayerRequestClass(playerid, classid)
    {
    if(classid == 0) //wenn der Spieler den ersten Skin auswählt
    {
    gTeam[playerid] = TEAM_GROVE;
    }
    if(classid == 1) //wenn der Spieler den zweiten Skin auswählt
    {
    gTeam[playerid] = TEAM_BALLAS;
    }
    if(classid == 2) //wenn der Spieler den dritten Skin auswählt
    {
    gTeam[playerid] = TEAM_COPS;
    }


    return 1;
    }


    public OnPlayerCommandText(playerid,cmdtext[])
    {
    if(strcmp("/copbase",cmdtext,true) == 0)
    {
    if(gTeam[playerid] == TEAM_COPS)
    {
    SetPlayerPos(playerid,123.00,456.00,22.00);
    SendClientMessage(playerid,0x00FF00FF,"Du bist nun bei der Cop-Base!");
    }
    else
    {
    SendClientMessage(playerid,0xFF0000FF,"Du bist kein Cop!");
    }
    return 1;
    }


    if(strcmp("/me",cmdtext,true) == 0)
    {
    if(gTeam[playerid] == TEAM_GROVE) GameTextForPlayer(playerid,"Du bist ein Grove!",3000,4);
    if(gTeam[playerid] == TEAM_BALLAS) GameTextForPlayer(playerid,"Du bist ein Balla!",3000,4);
    if(gTeam[playerid] == TEAM_COPS) GameTextForPlayer(playerid,"Du bist ein Cop!",3000,4);
    return 1;
    }


    return 0;
    }
    zusammen ?