Spieler eintragen in die VIP Liste

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
  • Hallo ich weiß gerade nicht wie ich jemanden eintragen lasse in die VIP liste sondern nur wenn man /vip eingibt, das man selber VIP wird aber nicht wie man einen anderen einträgt
    könnte mir jemand dabei helfen?
    Ich habe derzeit folgendes 0 Fehler..


    if(!strcmp(strget(cmdtext, 0), "/vip"))
    {
    if(PlayerInfo[playerid][pAdmin] <=1)
    {
    SendClientMessage(playerid,ROT, " Du bist kein Administrator!");
    }
    else
    {
    vip[playerid] = 1;
    format(string, sizeof(string), "Du hast %s in die VIP Liste eingetragen!",sendername);
    SendClientMessage(playerid, DUNKELBLAU, string);
    }
    return 1;
    }


  • if(!strcmp(strget(cmdtext, 0), "/vip"))
    {
    if(PlayerInfo[playerid][pAdmin] <=1)
    {
    SendClientMessage(playerid,ROT, " Du bist kein Administrator!");
    }
    else
    {
    tmp = strtok(cmdtext, idx);
    if(!tmp[0])return SendClientMessage(playerid, COLOR_WHITE, "Verwendung: /vip [Playerid/Name]");
    giveplayerid = ReturnUser(tmp);
    if(!IsPlayerConnected(giveplayerid))return SendClientMessage(playerid, Color_Yellow, "Dieser Spieler ist offline.");
    vip[playerid] = 1;
    format(string, sizeof(string), "Du hast %s in die VIP Liste eingetragen!",sendername);
    SendClientMessage(playerid, DUNKELBLAU, string);
    }
    return 1;
    }

    RFT

  • C:\Users\muhammed\Desktop\samp\gamemodes\LVScript.pwn(776) : error 017: undefined symbol "tmp"
    C:\Users\muhammed\Desktop\samp\gamemodes\LVScript.pwn(777) : error 017: undefined symbol "tmp"
    C:\Users\muhammed\Desktop\samp\gamemodes\LVScript.pwn(777) : warning 215: expression has no effect
    C:\Users\muhammed\Desktop\samp\gamemodes\LVScript.pwn(777) : error 001: expected token: ";", but found "]"
    C:\Users\muhammed\Desktop\samp\gamemodes\LVScript.pwn(777) : error 029: invalid expression, assumed zero
    C:\Users\muhammed\Desktop\samp\gamemodes\LVScript.pwn(777) : fatal error 107: too many error messages on one line



    if(!strcmp(strget(cmdtext, 0), "/vip"))
    {
    if(PlayerInfo[playerid][pAdmin] <=1)
    {
    SendClientMessage(playerid,ROT, " Du bist kein Administrator!");
    }
    else
    {
    tmp = strtok(cmdtext, idx); //776
    if(!tmp[0])return SendClientMessage(playerid, COLOR_WHITE, "Verwendung: /vip [Playerid/Name]"); //777
    giveplayerid = ReturnUser(tmp);
    if(!IsPlayerConnected(giveplayerid))return SendClientMessage(playerid, Color_Yellow, "Dieser Spieler ist offline.");
    vip[playerid] = 1;
    format(string, sizeof(string), "Du hast %s in die VIP Liste eingetragen!",sendername);
    SendClientMessage(playerid, DUNKELBLAU, string);
    }
    return 1;
    }

  • if(!strcmp(strget(cmdtext, 0), "/vip"))
    {
    if(PlayerInfo[playerid][pAdmin] <=1)
    {
    SendClientMessage(playerid,ROT, " Du bist kein Administrator!");
    }
    else
    {
    new tmp[60];
    tmp = strtok(cmdtext, idx); //776
    if(!tmp[0])return SendClientMessage(playerid, COLOR_WHITE, "Verwendung: /vip [Playerid/Name]"); //777
    giveplayerid = ReturnUser(tmp);
    if(!IsPlayerConnected(giveplayerid))return SendClientMessage(playerid, Color_Yellow, "Dieser Spieler ist offline.");
    vip[giveplayerid] = 1;//fehler von rft
    format(string, sizeof(string), "Du hast %s in die VIP Liste eingetragen!",sendername);
    SendClientMessage(playerid, DUNKELBLAU, string);
    }
    return 1;
    }

  • Nun bekomm ich diese Errors


    C:\Users\muhammed\Desktop\samp\gamemodes\LVScript.pwn(780) : error 017: undefined symbol "giveplayerid"
    C:\Users\muhammed\Desktop\samp\gamemodes\LVScript.pwn(781) : error 017: undefined symbol "giveplayerid"
    C:\Users\muhammed\Desktop\samp\gamemodes\LVScript.pwn(782) : error 017: undefined symbol "giveplayerid"


    Denkfehler musste
    new giveplayerid = ReturnUser(tmp);
    eingeben danke DT Sniper!!
    Ich versuche das Script nun ..


    DANKE AN ALLE
    Aber es wird nicht gespeichert kan mir jemand helfen

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • public OnPlayerConnect(playerid)
    {
    PlayerInfo[playerid][pSpectating] = 0; PlayerInfo[playerid][pMuted] = 0;
    AdminDuty[playerid] = 0;
    PlayerCuffed[playerid] = 0; PlayerCuffedTime[playerid] = 0;
    PlayerInfo[playerid][pLevel] = 1;
    PlayerInfo[playerid][pBanned] = 0;
    PlayerInfo[playerid][pAdmin] = 0;
    PlayerInfo[playerid][pIsjailed] = 0;
    PlayerInfo[playerid][pJailed] = 0;
    PlayerInfo[playerid][pCash] = 10000;
    PlayerInfo[playerid][pBank] = 0;
    PlayerInfo[playerid][pKills] = 0;
    PlayerInfo[playerid][pDeaths] = 0;
    PlayerInfo[playerid][pHours] = 0;
    PlayerInfo[playerid][pMins] = 0;
    PlayerInfo[playerid][pSex] = 1;
    PlayerInfo[playerid][pMember] = 0;
    PlayerInfo[playerid][pRank] = 0;
    PlayerInfo[playerid][pSkin] = 7;
    PlayerInfo[playerid][pparfum] = 0;
    PlayerInfo[playerid][phygiene] = 0;
    PlayerInfo[playerid][puhr] = 0;
    PlayerInfo[playerid][pbkill] = 0;
    Piss[playerid] = 0;
    return 1;
    }



    public OnPlayerDisconnect(playerid, reason)
    {
    isafk[playerid] = 0;
    new string[256];
    dUserSetINT(GetName(playerid)).("level",GetPlayerScore(playerid));
    dUserSetINT(GetName(playerid)).("banned",PlayerInfo[playerid][pBanned]);
    dUserSetINT(GetName(playerid)).("adminlvl",PlayerInfo[playerid][pAdmin]);
    dUserSetINT(GetName(playerid)).("isjailed",PlayerInfo[playerid][pIsjailed]);
    dUserSetINT(GetName(playerid)).("jailed",PlayerInfo[playerid][pJailed]);
    dUserSetINT(GetName(playerid)).("money",GetPlayerMoney(playerid));
    dUserSetINT(GetName(playerid)).("premium",PlayerInfo[playerid][ppremium]);
    dUserSetINT(GetName(playerid)).("bank",PlayerInfo[playerid][pBank]);
    dUserSetINT(GetName(playerid)).("kills",PlayerInfo[playerid][pKills]);
    dUserSetINT(GetName(playerid)).("deaths",PlayerInfo[playerid][pDeaths]);
    dUserSetINT(GetName(playerid)).("hours",PlayerInfo[playerid][pHours]);
    dUserSetINT(GetName(playerid)).("mins",PlayerInfo[playerid][pMins]);
    dUserSetINT(GetName(playerid)).("sex",PlayerInfo[playerid][pSex]);
    dUserSetINT(GetName(playerid)).("member",PlayerInfo[playerid][pMember]);
    dUserSetINT(GetName(playerid)).("rank",PlayerInfo[playerid][pRank]);
    dUserSetINT(GetName(playerid)).("skin",PlayerInfo[playerid][pSkin]);
    dUserSetINT(GetName(playerid)).("parfum",PlayerInfo[playerid][pparfum]);


    dUserSetINT(GetName(playerid)).("uhr",PlayerInfo[playerid][puhr]);
    dUserSetINT(GetName(playerid)).("Paintball Kill",PlayerInfo[playerid][pbkill]);


    dUserSetINT(GetName(playerid)).("Piss",Piss[playerid]);
    dUserSetINT(GetName(playerid)).("hygiene",PlayerInfo[playerid][phygiene]);
    return 1;
    }
    public PlayerUpdate(playerid)
    {
    dUserSetINT(GetName(playerid)).("level",GetPlayerScore(playerid));
    dUserSetINT(GetName(playerid)).("banned",PlayerInfo[playerid][pBanned]);
    dUserSetINT(GetName(playerid)).("adminlvl",PlayerInfo[playerid][pAdmin]);
    dUserSetINT(GetName(playerid)).("isjailed",PlayerInfo[playerid][pIsjailed]);
    dUserSetINT(GetName(playerid)).("jailed",PlayerInfo[playerid][pJailed]);
    dUserSetINT(GetName(playerid)).("money",GetPlayerMoney(playerid));
    dUserSetINT(GetName(playerid)).("bank",PlayerInfo[playerid][pBank]);
    dUserSetINT(GetName(playerid)).("kills",PlayerInfo[playerid][pKills]);
    dUserSetINT(GetName(playerid)).("deaths",PlayerInfo[playerid][pDeaths]);
    dUserSetINT(GetName(playerid)).("hours",PlayerInfo[playerid][pHours]);
    dUserSetINT(GetName(playerid)).("mins",PlayerInfo[playerid][pMins]);
    dUserSetINT(GetName(playerid)).("sex",PlayerInfo[playerid][pSex]);
    dUserSetINT(GetName(playerid)).("member",PlayerInfo[playerid][pMember]);
    dUserSetINT(GetName(playerid)).("rank",PlayerInfo[playerid][pRank]);
    dUserSetINT(GetName(playerid)).("skin",PlayerInfo[playerid][pSkin]);
    dUserSetINT(GetName(playerid)).("Piss",Piss[playerid]);
    dUserSetINT(GetName(playerid)).("parfum",PlayerInfo[playerid][pparfum]);
    dUserSetINT(GetName(playerid)).("uhr",PlayerInfo[playerid][puhr]);
    dUserSetINT(GetName(playerid)).("Paintball Kill",PlayerInfo[playerid][pbkill]);
    dUserSetINT(GetName(playerid)).("hygiene",PlayerInfo[playerid][phygiene]);
    }


    Das wars eig.. das gleiche denn noch unter dem Login & Register Befehl..