Players on Map

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

  • Das unter public OnGameModeInit, dann müsste es gehen

    Mfg Farin

    3 Mal editiert, zuletzt von Farin ()


  • Das unter public OnGameModeInit, dann müsste es gehen


    wieso die ganzen Klammern?


    OnGameModeInit()
    {
    ShowPlayerMarkers(1);
    ShowNameTags( 1 );
    return 1;
    }

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • So?
    public OnGameModeInit()
    {
    new string[MAX_PLAYER_NAME];
    new string1[MAX_PLAYER_NAME];
    for(new c=0;c<CAR_AMOUNT;c++)
    {
    Gas[code=c] = GasMax;
    }
    OnGameModeInit()
    {
    ShowPlayerMarkers(1);
    ShowNameTags( 1 );
    return 1;
    }
    LoadProperty();
    LoadBizz();
    LoadSBizz();
    .
    .


    Macht aber wenig Sinn iwie oder? hmm

  • public OnPlayerSpawn
    {
    ShowPlayerMarkers(1);
    ShowNameTags( 1 );
    return 1;
    }

  • Hmm wenn ich das so mache:


    public OnPlayerSpawn
    {
    ShowPlayerMarkers(1);
    ShowNameTags( 1 );
    return 1;
    }
    public OnGameModeInit()
    {
    new string[MAX_PLAYER_NAME];
    new string1[MAX_PLAYER_NAME];
    for(new c=0;c<CAR_AMOUNT;c++)
    {
    Gas[code=c] = GasMax;
    }
    LoadProperty();
    LoadBizz();
    .
    .
    .


    bekomme ich zwei Fehler. Sorry, bin noch ganz neu :)

  • C:\Dokumente und Einstellungen\marcela\Desktop\gta code\gf.pwn(6555) : error 021: symbol already defined: "OnPlayerSpawn"
    C:\Dokumente und Einstellungen\marcela\Desktop\gta code\gf.pwn(6558) : error 010: invalid function or declaration



    Wo soll ich es den in die Funkrion OnPlayerSpawn rein haun?


    code:
    public OnPlayerSpawn(playerid)
    {
    InitLockDoors(playerid);
    STDPlayer[playerid] = 0;
    gTeam[playerid] = PlayerInfo[playerid][pTeam]; //Set the Team
    if (gTeam[playerid] == 4) //medic / criminal reset team
    {
    gTeam[playerid] = 3;
    }
    if(gPlayerLogged[playerid] == 0)
    {
    SendClientMessage(playerid, COLOR_LIGHTRED, "** This server requires a Login BEFORE spawn (Kicked) **");
    KickPlayer[playerid] = 1;
    }
    if(gTeam[playerid] == 11 && PlayerInfo[playerid][pLeader] < 1)
    {
    MedicBill[playerid] = 0;
    new rand = random(sizeof(CIV));
    SendClientMessage(playerid, COLOR_LIGHTRED, "You are not an Approved Leader, you are now a Civilian !");
    PlayerInfo[playerid][pTeam] = 3;
    gTeam[playerid] = 3;
    SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
    PlayerInfo[playerid][pModel] = CIV[rand];
    SpawnPlayer(playerid);
    }

  • Also ich war eigentlich der Meinung dass ShowPlayerMarkers und ShowNameTags nur einmal aufgerufen werden muss und dann serverweit für alle gilt ist, von daher halte ich das unnötig dies in OnPlayerSpawn oder onPlayerConnect zu schreiben..?

    Intel Xeon W3690 Hexacore @ 4.5 GHz - 48GB Triple Channel DDR3 - GeForce RTX 2070 Super - Asus P6T Deluxe V1 @ P6T WS Pro BIOS

    Mainboard 12 Jahre, CPU 10 Jahre alt - old but gold!

  • :/ hilfe xD


    hier mein code von onplaymod:


    public OnGameModeInit()
    {
    new string[MAX_PLAYER_NAME];
    new string1[MAX_PLAYER_NAME];
    for(new c=0;c<CAR_AMOUNT;c++)
    {
    Gas[code=c] = GasMax;
    }
    LoadProperty();
    LoadBizz();
    LoadSBizz();
    LoadBoxer();
    LoadStuff();
    LoadIRC();
    LoadFamilies();
    LoadCK();
    LoadTurfs();
    LoadPapers();
    IRCInfo[0][iPlayers] = 0; IRCInfo[1][iPlayers] = 0; IRCInfo[2][iPlayers] = 0;
    IRCInfo[3][iPlayers] = 0; IRCInfo[4][iPlayers] = 0; IRCInfo[5][iPlayers] = 0;
    IRCInfo[6][iPlayers] = 0; IRCInfo[7][iPlayers] = 0; IRCInfo[8][iPlayers] = 0;
    IRCInfo[9][iPlayers] = 0;
    News[hTaken1] = 0; News[hTaken2] = 0; News[hTaken3] = 0; News[hTaken4] = 0; News[hTaken5] = 0;
    format(string, sizeof(string), "Nothing");
    strmid(News[hAdd1], string, 0, strlen(string), 255);
    strmid(News[hAdd2], string, 0, strlen(string), 255);
    strmid(News[hAdd3], string, 0, strlen(string), 255);
    strmid(News[hAdd4], string, 0, strlen(string), 255);
    strmid(News[hAdd5], string, 0, strlen(string), 255);
    format(string1, sizeof(string1), "No-one");
    strmid(News[hContact1], string1, 0, strlen(string1), 255);
    strmid(News[hContact2], string1, 0, strlen(string1), 255);
    strmid(News[hContact3], string1, 0, strlen(string1), 255);
    strmid(News[hContact4], string1, 0, strlen(string1), 255);
    strmid(News[hContact5], string1, 0, strlen(string1), 255);
    PlayerHaul[78][pCapasity] = 100;
    PlayerHaul[79][pCapasity] = 100;
    PlayerHaul[80][pCapasity] = 50;
    PlayerHaul[81][pCapasity] = 50;
    SetGameModeText("Hailstorm -> GoDFather LS/SF");
    format(objstore, sizeof(objstore), "MOLE: I got nothing, check back with me later.");
    format(cbjstore, sizeof(cbjstore), "HQ: There is nothing in your Vicinity, Out.");
    format(motd, sizeof(motd), "Welcome to our Server - Hailstorm SA.");
    gettime(ghour, gminute, gsecond);
    FixHour(ghour);
    ghour = shifthour;


    Wo gehört also nun


    OnGameModeInit()
    {
    ShowPlayerMarkers(1);
    ShowNameTags( 1 );
    return 1;
    }


    rein? Ich blick gar nicht mehr durch 8o