Beiträge von Mambo

    Hier ist der filterscript /login/register system aber irgendwie funzt das net :D ahbe 1 error und 1 warning


    C:\GTa an lol (Lasse)\Server\GTARP\filterscripts\registersystem.pwn(18) : error 001: expected token: "]", but found ";"
    C:\GTa an lol (Lasse)\Server\GTARP\filterscripts\registersystem.pwn(338) : warning 203: symbol is never used: "pFirstLog"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Error.


    Hier der filterscript


    #include <a_samp>


    #define FILTERSCRIPT


    #if defined FILTERSCRIPT
    #define COLOR_GREY 0xBEBEBEAA
    #define COLOR_WHITE 0xFFFFFFAA
    #define COLOR_GREEN 0x33AA33AA
    #define COLOR_GRAD5 0xE3E3E3FF
    #define COLOR_GRAD1 0xB4B5B7FF
    #define COLOR_YELLOW 0xFFFF00AA


    forward ShowStats(playerid,targetid);
    forward OnPlayerUpdate(playerid);
    forward Encrypt(string[]);
    forward OnPlayerLogin(playerid,const string[]);


    new bool:pFirstLog[MAX_PLAYERS;];



    enum pInfo
    {
    pPassword[128],
    pKills,
    pDeaths,
    pCash,
    };


    new PlayerInfo[MAX_PLAYERS][pInfo];
    new gPlayerLogged[MAX_PLAYERS];
    new gPlayerAccount[MAX_PLAYERS];



    public OnFilterScriptInit()
    {
    print("\n$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$");
    print(" Kevin433's Login/Register Filterscript");
    print("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n");
    return 1;
    }


    public OnFilterScriptExit()
    {
    return 1;
    }


    public OnPlayerRequestClass(playerid, classid)
    {
    return 1;
    }


    public OnPlayerRequestSpawn(playerid)
    {
    return 1;
    }


    public OnPlayerConnect(playerid)
    {
    new playrname[MAX_PLAYER_NAME];
    new connect[128];
    GetPlayerName(playerid, playrname, sizeof(playrname));
    format(connect, sizeof(connect), "%s.cer", playrname);
    if(fexist(connect))
    {
    gPlayerAccount[playerid] = 1;
    SendClientMessage(playerid, COLOR_YELLOW, "Du bist registriert, bitte logge dich mit /login password ein");
    return 1;
    }
    else
    {
    gPlayerAccount[playerid] = 0;
    SendClientMessage(playerid, COLOR_YELLOW, "Bitte registriere dich mit /register password");
    }
    return 1;
    }


    public OnPlayerDisconnect(playerid, reason)
    {
    OnPlayerUpdate(playerid);
    gPlayerLogged[playerid] = 0;
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    return 1;
    }


    public OnPlayerDeath(playerid, killerid, reason)
    {
    new kills = PlayerInfo[playerid][pKills];
    SetPlayerScore(playerid, kills);
    new Float:Health;
    GetPlayerHealth(playerid, Health);
    if(Health == 0.0)
    {
    PlayerInfo[playerid][pDeaths] += 1;
    }
    GivePlayerMoney(killerid,2000);
    PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills] + 1;
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    new cmd[256];
    new idx;
    cmd = strtok(cmdtext, idx);
    new tmp[256];
    new playername[MAX_PLAYER_NAME];
    if (strcmp(cmd, "/login", true) ==0 )
    {
    if(IsPlayerConnected(playerid))
    {
    new tmppass[64];
    if(gPlayerLogged[playerid] == 1)
    {
    SendClientMessage(playerid, COLOR_GREY, " Du bist bereits eingeloggt.");
    return 1;
    }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GREY, " Benutze: /login [password]");
    return 1;
    }
    strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
    Encrypt(tmppass);
    OnPlayerLogin(playerid,tmppass);
    }
    return 1;
    }
    if (strcmp(cmd, "/register", true)==0)
    {
    new string[265];
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GREY, "Benutze: /register [password]");
    return 1;
    }
    if (gPlayerAccount[playerid] == 1)
    {
    SendClientMessage(playerid, COLOR_GREY, " Der Name ist bereits registriert");
    return 1;
    }


    strmid(PlayerInfo[playerid][pPassword], tmp, 0, strlen(cmdtext), 255);
    Encrypt(PlayerInfo[playerid][pPassword]);
    GetPlayerName(playerid, playername, sizeof(playername));
    format(string, sizeof(string), "%s.cer", playername);
    new File: file = fopen(string, io_read);
    if (file)
    {
    SendClientMessage(playerid, COLOR_GREY, " Der Name ist bereits registriert");
    fclose(file);
    return 1;
    }
    new File:hFile;
    hFile = fopen(string, io_append);
    new var[32];//
    format(var, 32, "%s\n", PlayerInfo[playerid][pPassword]);fwrite(hFile, var);
    format(var, 32, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var);
    format(var, 32, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
    PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
    format(var, 32, "Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
    fclose(hFile);
    SendClientMessage(playerid, COLOR_WHITE, "Erfolgreich registriert!");
    SendClientMessage(playerid, COLOR_WHITE, "Gebe nächstes mal /login <password> zum einloggen ein.");
    OnPlayerLogin(playerid,PlayerInfo[playerid][pPassword]);
    return 1;
    }
    if (strcmp(cmd, "/stats", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if (gPlayerLogged[playerid] != 0)
    {
    ShowStats(playerid,playerid);
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, " Du bist nicht eingeloggt !");
    }
    }
    return 1;
    }
    return 0;
    }


    public Encrypt(string[])
    {
    for(new x=0; x < strlen(string); x++)
    {
    string[x] += (3^x) * (x % 15);
    if(string[x] > (0xff))
    {
    string[x] -= 64;
    }
    }
    return 1;
    }



    public OnPlayerLogin(playerid,const string[])
    {
    new pname2[MAX_PLAYER_NAME];
    new pname3[MAX_PLAYER_NAME];
    new string2[64];
    new string3[128];
    GetPlayerName(playerid, pname2, sizeof(pname2));
    format(string2, sizeof(string2), "%s.cer", pname2);
    new File: UserFile = fopen(string2, io_read);


    if (UserFile)
    {
    new valtmp[128];
    fread(UserFile, valtmp);strmid(PlayerInfo[playerid][pPassword], valtmp, 0, strlen(valtmp)-1, 255);


    if ((strcmp(PlayerInfo[playerid][pPassword], string, true, strlen(valtmp)-1) == 0))
    {
    new key[128],val[128];
    new Data[128];
    while(fread(UserFile,Data,sizeof(Data)))
    {
    key = ini_GetKey(Data);
    if( strcmp( key , "Kills" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKills] = strval( val ); }
    if( strcmp( key , "Deaths" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDeaths] = strval( val ); }
    if( strcmp( key , "Money" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCash] = strval( val ); }
    GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
    }
    fclose(UserFile);
    gPlayerLogged[playerid] = 1;
    gPlayerAccount[playerid] = 1;
    new kills = PlayerInfo[playerid][pKills];
    SetPlayerScore(playerid, kills);
    GetPlayerName(playerid, pname3, sizeof(pname3));
    format(string3, sizeof(string3), "Welcome %s, du bist bereits eingeloggt!", pname3);
    SendClientMessage(playerid, COLOR_WHITE,string3);
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Falsches Passwort");
    fclose(UserFile);
    }
    }
    return 1;
    }


    public OnPlayerUpdate(playerid)
    {
    if(IsPlayerConnected(playerid))
    {
    if(gPlayerLogged[playerid])
    {
    new string3[32];
    new pname3[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname3, sizeof(pname3));
    format(string3, sizeof(string3), "%s.cer", pname3);
    new File: pFile = fopen(string3, io_write);
    if (pFile)
    {
    new var[32];
    format(var, 32, "%s\n", PlayerInfo[playerid][pPassword]);fwrite(pFile, var);
    fclose(pFile);
    new File: hFile = fopen(string3, io_append);
    PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
    format(var, 32, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var);
    format(var, 32, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
    format(var, 32, "Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
    fclose(hFile);
    }
    }
    }
    return 1;
    }


    stock ini_GetKey( line[] )
    {
    new keyRes[128];
    keyRes[0] = 0;
    if ( strfind( line , "=" , true ) == -1 ) return keyRes;
    strmid( keyRes , line , 0 , strfind( line , "=" , true ) , sizeof( keyRes) );
    return keyRes;
    }


    stock ini_GetValue( line[] )
    {
    new valRes[128];
    valRes[0]=0;
    if ( strfind( line , "=" , true ) == -1 ) return valRes;
    strmid( valRes , line , strfind( line , "=" , true )+1 , strlen( line ) , sizeof( valRes ) );
    return valRes;
    }



    strtok(const string[], &index)
    {
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
    index++;
    }


    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
    result[index - offset] = string[index];
    index++;
    }
    result[index - offset] = EOS;
    return result;
    }


    public ShowStats(playerid,targetid)
    {
    if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
    {
    new cash = GetPlayerMoney(targetid);
    new deaths = PlayerInfo[targetid][pDeaths];
    new kills = PlayerInfo[targetid][pKills];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(targetid, name, sizeof(name));
    new Float:px,Float:py,Float:pz;
    GetPlayerPos(targetid, px, py, pz);
    new coordsstring[256];
    SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
    format(coordsstring, sizeof(coordsstring),"*** %s ***",name);
    SendClientMessage(playerid, COLOR_WHITE,coordsstring);
    format(coordsstring, sizeof(coordsstring), "Kills:[%d] Deaths:[%d] Cash:[$%d]",kills,deaths,cash);
    SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
    SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
    }
    }


    #endif

    Hier das oberer von der zeile von dme filterscript




    #include <a_samp>


    #define FILTERSCRIPT


    #if defined FILTERSCRIPT
    #define COLOR_GREY 0xBEBEBEAA
    #define COLOR_WHITE 0xFFFFFFAA
    #define COLOR_GREEN 0x33AA33AA
    #define COLOR_GRAD5 0xE3E3E3FF
    #define COLOR_GRAD1 0xB4B5B7FF
    #define COLOR_YELLOW 0xFFFF00AA


    forward ShowStats(playerid,targetid);
    forward OnPlayerUpdate(playerid);
    forward Encrypt(string[]);
    forward OnPlayerLogin(playerid,const string[]);


    pFirstLog[playerid] = true;

    Habe Fehler in meinem filterscript Oo


    C:\GTa an lol (Lasse)\Server\GTARP\filterscripts\registersystem.pwn(18) : error 010: invalid function or declaration
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Error.

    Hier und den error schreibe ich runter wenn jemand was unter dem hier gepostet hat sonst gillt das als pushing ;)



    #include <a_samp>


    #define FILTERSCRIPT


    #if defined FILTERSCRIPT
    #define COLOR_GREY 0xBEBEBEAA
    #define COLOR_WHITE 0xFFFFFFAA
    #define COLOR_GREEN 0x33AA33AA
    #define COLOR_GRAD5 0xE3E3E3FF
    #define COLOR_GRAD1 0xB4B5B7FF
    #define COLOR_YELLOW 0xFFFF00AA


    forward ShowStats(playerid,targetid);
    forward OnPlayerUpdate(playerid);
    forward Encrypt(string[]);
    forward OnPlayerLogin(playerid,const string[]);


    pFirstLog[playerid] = true;



    enum pInfo
    {
    pPassword[128],
    pKills,
    pDeaths,
    pCash,
    };


    new PlayerInfo[MAX_PLAYERS][pInfo];
    new gPlayerLogged[MAX_PLAYERS];
    new gPlayerAccount[MAX_PLAYERS];



    public OnFilterScriptInit()
    {
    print("\n$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$");
    print(" Kevin433's Login/Register Filterscript");
    print("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n");
    return 1;
    }


    public OnFilterScriptExit()
    {
    return 1;
    }


    public OnPlayerRequestClass(playerid, classid)
    {
    return 1;
    }


    public OnPlayerRequestSpawn(playerid)
    {
    return 1;
    }


    public OnPlayerConnect(playerid)
    {
    new playrname[MAX_PLAYER_NAME];
    new connect[128];
    GetPlayerName(playerid, playrname, sizeof(playrname));
    format(connect, sizeof(connect), "%s.cer", playrname);
    if(fexist(connect))
    {
    gPlayerAccount[playerid] = 1;
    SendClientMessage(playerid, COLOR_YELLOW, "Du bist registriert, bitte logge dich mit /login password ein");
    return 1;
    }
    else
    {
    gPlayerAccount[playerid] = 0;
    SendClientMessage(playerid, COLOR_YELLOW, "Bitte registriere dich mit /register password");
    }
    return 1;
    }


    public OnPlayerDisconnect(playerid, reason)
    {
    OnPlayerUpdate(playerid);
    gPlayerLogged[playerid] = 0;
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    return 1;
    }


    public OnPlayerDeath(playerid, killerid, reason)
    {
    new kills = PlayerInfo[playerid][pKills];
    SetPlayerScore(playerid, kills);
    new Float:Health;
    GetPlayerHealth(playerid, Health);
    if(Health == 0.0)
    {
    PlayerInfo[playerid][pDeaths] += 1;
    }
    GivePlayerMoney(killerid,2000);
    PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills] + 1;
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    new cmd[256];
    new idx;
    cmd = strtok(cmdtext, idx);
    new tmp[256];
    new playername[MAX_PLAYER_NAME];
    if (strcmp(cmd, "/login", true) ==0 )
    {
    if(IsPlayerConnected(playerid))
    {
    new tmppass[64];
    if(gPlayerLogged[playerid] == 1)
    {
    SendClientMessage(playerid, COLOR_GREY, " Du bist bereits eingeloggt.");
    return 1;
    }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GREY, " Benutze: /login [password]");
    return 1;
    }
    strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
    Encrypt(tmppass);
    OnPlayerLogin(playerid,tmppass);
    }
    return 1;
    }
    if (strcmp(cmd, "/register", true)==0)
    {
    new string[265];
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GREY, "Benutze: /register [password]");
    return 1;
    }
    if (gPlayerAccount[playerid] == 1)
    {
    SendClientMessage(playerid, COLOR_GREY, " Der Name ist bereits registriert");
    return 1;
    }


    strmid(PlayerInfo[playerid][pPassword], tmp, 0, strlen(cmdtext), 255);
    Encrypt(PlayerInfo[playerid][pPassword]);
    GetPlayerName(playerid, playername, sizeof(playername));
    format(string, sizeof(string), "%s.cer", playername);
    new File: file = fopen(string, io_read);
    if (file)
    {
    SendClientMessage(playerid, COLOR_GREY, " Der Name ist bereits registriert");
    fclose(file);
    return 1;
    }
    new File:hFile;
    hFile = fopen(string, io_append);
    new var[32];//
    format(var, 32, "%s\n", PlayerInfo[playerid][pPassword]);fwrite(hFile, var);
    format(var, 32, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var);
    format(var, 32, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
    PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
    format(var, 32, "Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
    fclose(hFile);
    SendClientMessage(playerid, COLOR_WHITE, "Erfolgreich registriert!");
    SendClientMessage(playerid, COLOR_WHITE, "Gebe nächstes mal /login <password> zum einloggen ein.");
    OnPlayerLogin(playerid,PlayerInfo[playerid][pPassword]);
    return 1;
    }
    if (strcmp(cmd, "/stats", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if (gPlayerLogged[playerid] != 0)
    {
    ShowStats(playerid,playerid);
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, " Du bist nicht eingeloggt !");
    }
    }
    return 1;
    }
    return 0;
    }


    public Encrypt(string[])
    {
    for(new x=0; x < strlen(string); x++)
    {
    string[x] += (3^x) * (x % 15);
    if(string[x] > (0xff))
    {
    string[x] -= 64;
    }
    }
    return 1;
    }



    public OnPlayerLogin(playerid,const string[])
    {
    new pname2[MAX_PLAYER_NAME];
    new pname3[MAX_PLAYER_NAME];
    new string2[64];
    new string3[128];
    GetPlayerName(playerid, pname2, sizeof(pname2));
    format(string2, sizeof(string2), "%s.cer", pname2);
    new File: UserFile = fopen(string2, io_read);


    if (UserFile)
    {
    new valtmp[128];
    fread(UserFile, valtmp);strmid(PlayerInfo[playerid][pPassword], valtmp, 0, strlen(valtmp)-1, 255);


    if ((strcmp(PlayerInfo[playerid][pPassword], string, true, strlen(valtmp)-1) == 0))
    {
    new key[128],val[128];
    new Data[128];
    while(fread(UserFile,Data,sizeof(Data)))
    {
    key = ini_GetKey(Data);
    if( strcmp( key , "Kills" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKills] = strval( val ); }
    if( strcmp( key , "Deaths" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDeaths] = strval( val ); }
    if( strcmp( key , "Money" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCash] = strval( val ); }
    GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
    }
    fclose(UserFile);
    gPlayerLogged[playerid] = 1;
    gPlayerAccount[playerid] = 1;
    new kills = PlayerInfo[playerid][pKills];
    SetPlayerScore(playerid, kills);
    GetPlayerName(playerid, pname3, sizeof(pname3));
    format(string3, sizeof(string3), "Welcome %s, du bist bereits eingeloggt!", pname3);
    SendClientMessage(playerid, COLOR_WHITE,string3);
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Falsches Passwort");
    fclose(UserFile);
    }
    }
    return 1;
    }


    public OnPlayerUpdate(playerid)
    {
    if(IsPlayerConnected(playerid))
    {
    if(gPlayerLogged[playerid])
    {
    new string3[32];
    new pname3[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname3, sizeof(pname3));
    format(string3, sizeof(string3), "%s.cer", pname3);
    new File: pFile = fopen(string3, io_write);
    if (pFile)
    {
    new var[32];
    format(var, 32, "%s\n", PlayerInfo[playerid][pPassword]);fwrite(pFile, var);
    fclose(pFile);
    new File: hFile = fopen(string3, io_append);
    PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
    format(var, 32, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var);
    format(var, 32, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
    format(var, 32, "Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
    fclose(hFile);
    }
    }
    }
    return 1;
    }


    stock ini_GetKey( line[] )
    {
    new keyRes[128];
    keyRes[0] = 0;
    if ( strfind( line , "=" , true ) == -1 ) return keyRes;
    strmid( keyRes , line , 0 , strfind( line , "=" , true ) , sizeof( keyRes) );
    return keyRes;
    }


    stock ini_GetValue( line[] )
    {
    new valRes[128];
    valRes[0]=0;
    if ( strfind( line , "=" , true ) == -1 ) return valRes;
    strmid( valRes , line , strfind( line , "=" , true )+1 , strlen( line ) , sizeof( valRes ) );
    return valRes;
    }



    strtok(const string[], &index)
    {
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
    index++;
    }


    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
    result[index - offset] = string[index];
    index++;
    }
    result[index - offset] = EOS;
    return result;
    }


    public ShowStats(playerid,targetid)
    {
    if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
    {
    new cash = GetPlayerMoney(targetid);
    new deaths = PlayerInfo[targetid][pDeaths];
    new kills = PlayerInfo[targetid][pKills];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(targetid, name, sizeof(name));
    new Float:px,Float:py,Float:pz;
    GetPlayerPos(targetid, px, py, pz);
    new coordsstring[256];
    SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
    format(coordsstring, sizeof(coordsstring),"*** %s ***",name);
    SendClientMessage(playerid, COLOR_WHITE,coordsstring);
    format(coordsstring, sizeof(coordsstring), "Kills:[%d] Deaths:[%d] Cash:[$%d]",kills,deaths,cash);
    SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
    SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
    }
    }


    #endif

    glaube schon oder? xD


    public Tutorial(playerid)
    {
    if(TutTime[playerid] >= 1) // wenn die Zeit auf 1 gesetzt worden war, gehts los. Wenn während des Tutorials die zeit wieder auf 0 gesetzt wird, passiert in dem Timer garnichts.
    {
    if(TutTime[playerid] == 2)// hier wird abgefragt wieviel Sekunden seit dem Start des Tutorials verstrichen sind
    {
    SendClientMessage(playerid,msg,"*~'__(Tutorial: Willkommen!)__'~*");
    SendClientMessage(playerid,msg,"Es folgt nun ein kleines Tutorial, passe bitte gut auf.");
    SendClientMessage(playerid,msg,"Falls dann doch noch Fragen offen bleiben, fragt im Forum oder die Admins/Spieler.");
    }
    else if(TutTime[playerid] == 10)// hier wird abgefragt wieviel Sekunden seit dem Start des Tutorials verstrichen sind
    {
    SendClientMessage(playerid,msg,"*~'__(Tutorial: Respekt und Umgangston!)__'~*");
    SendClientMessage(playerid,msg,"Bitte behandle jeden so wie du gern behandelt werden möchtest.");
    SendClientMessage(playerid,msg,"Falls du in einem falschen Umgangston redest wirst du verwarnt.");
    SendClientMessage(playerid,msg,"Bitte respektiere die Admins auch, denn auch sie werden dich..");
    SendClientMessage(playerid,msg,"..respektieren. Also: Achte auf deinen Umgangston!");
    }
    else if(TutTime[playerid] == 18)// hier wird abgefragt wieviel Sekunden seit dem Start des Tutorials verstrichen sind
    {
    SendClientMessage(playerid,msg,"*~'__(Tutorial: Bugusing oder Ähnliches!)__'~*");
    SendClientMessage(playerid,msg,"Falls du jemanden siehst, der einen Bug used.");
    SendClientMessage(playerid,msg,"Oder auch wenn er cheatet oder andere 'illegale' Sachen tut..");
    SendClientMessage(playerid,msg,"Bitte reporte ihn oder mach einen Screen und stell ihn ins Forum.");
    }
    else if(TutTime[playerid] == 26)// hier wird abgefragt wieviel Sekunden seit dem Start des Tutorials verstrichen sind
    {
    SendClientMessage(playerid,msg,"*~'__(Tutorial: Häuser und Autos!)__'~*");
    SendClientMessage(playerid,msg,"Wie auf jedem Reallife Server, so auch hier gibt es Autohäuser und Häuser zum Verkauf.");
    SendClientMessage(playerid,msg,"Wenn du ein Haus haben willst, brauchst du einen Makler. Du spawnst immer wieder vor deinem Haus.");
    SendClientMessage(playerid,msg,"Wenn du ein Auto haben willt, fahr zum nächsten Autohaus.");
    SendClientMessage(playerid,msg,"Es gibt mehrere von Ihnen und verschiedene Preisklassen.Dein Auto kannst du dann irgendwo parken..");
    SendClientMessage(playerid,msg,"..oder auch Verkaufen, falls es dir nicht gefällt.");
    }
    else if(TutTime[playerid] == 34)// hier wird abgefragt wieviel Sekunden seit dem Start des Tutorials verstrichen sind
    {
    SendClientMessage(playerid,msg,"*~'__(Tutorial: Berufe und Firmen!)__'~*");
    SendClientMessage(playerid,msg,"Jeder Bürger von San Fierro kann eine eigene Firma gründen.");
    SendClientMessage(playerid,msg,"Du brauchst jedoch genug Geld und ein Konzept.");
    SendClientMessage(playerid,msg,"Wenn du dies beides besitzt, schreib es ins Forum und wir werden es uns anschauen.");
    SendClientMessage(playerid,msg,"Doch auch andere Berufe kannst du ausüben, bewerben tut man sich im Forum..");
    SendClientMessage(playerid,msg,"..dort kannst du auch dich für ein Chef Posten bewerben, falls einer frei ist.");
    }
    else if(TutTime[playerid] == 42)
    {
    SendClientMessage(playerid,msg,"*~'__(Tutorial: Das Ende!)__'~*");
    SendClientMessage(playerid,msg,"Vielen Dank, dass du dir Zeit fürs Tutorial genommen hast.");
    SendClientMessage(playerid,msg,"Falls weitere Fragen bestehen, wende dich an Spieler oder Admins.");
    }
    else if(TutTime[playerid] == 50) // hier wird abgefragt wieviel Sekunden seit dem Start des Tutorials verstrichen sind
    {
    KillTimer(TutTimer[playerid]); // der Tutorial Timer wird beendigt
    TutTime[playerid] = -1; // die Tutorial Zeit auf INVALID gsetzt - nach Goldkiller :)
    SetPlayerPos(playerid,0.0,0.0,0.0); // der Spawn, wo er nach dem Tutorial hinsoll
    TogglePlayerControllable(playerid,true); // hier wird die Fähigkeit sich zu bewegen wieder auf "wahr" gesetzt
    GameTextForPlayer(playerid,"~g~Willkommen, ~r~ in San Fierro.",6000,1); // GameText am Ende des Tutorials
    }
    TutTime[playerid]++; // hier wird die Zeit jede Sekunde erhöht
    }
    }

    #include <a_samp>
    #include <dini>
    #include <Dudb>
    #pragma unused ret_memcpy
    #pragma unused strtok
    #pragma tabsize 0
    #pragma unused TutTime
    #pragma unused TutTimer
    #pragma unused pFirstLog
    #define FILTERSCRIPT
    #define msg



    new bool:pFirstLog[MAX_PLAYERS],TutTimer[MAX_PLAYERS],TutTime[MAX_PLAYERS];
    forward Tutorial(playerid);



    main()
    {
    print("\n----------------------------------");
    print(" ");
    print("----------------------------------\n");
    }


    public OnGameModeInit()
    {
    SetGameModeText("German Realive");
    AddPlayerClass(0,1108.7482,-1796.7314,16.5938,86.7707,0,0,0,0,0,0); // position;
    AddPlayerClass(1,1108.7482,-1796.7314,16.5938,86.7707,25,0,0,0,0,0); // position


    return 1;
    }


    public OnGameModeExit()
    {
    return 1;
    }


    public OnPlayerRequestClass(playerid, classid)
    {
    SetPlayerPos(playerid,1108.4147,-1796.7128,16.5938);
    SetPlayerFacingAngle(playerid,86.7707);
    SetPlayerCameraPos(playerid,1108.4147,-1796.7128,16.5938);
    SetPlayerCameraLookAt(playerid,1108.4147,-1796.7128,16.5938);

    return 1;
    }


    public OnPlayerConnect(playerid)
    {
    SetPlayerColor(playerid,0xFAFAFAFF);
    return 1;
    }


    public OnPlayerDisconnect(playerid, reason)
    {
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    if(pFirstLog[playerid] == true)
    {
    SetPlayerPos(playerid,0.0,0.0,0.0); // Tutorial Position
    TogglePlayerControllable(playerid,false);
    TutTime[playerid] = 1;
    TutTimer[playerid] = SetTimerEx("Tutorial",1000,1,"i",playerid);
    }
    return 1;
    }


    public OnPlayerDeath(playerid, killerid, reason)
    {
    SendClientMessage(killerid,0xFFFF00FF,"Sie haben einen Mord begannen");
    SendClientMessage(playerid,0xFFFF00FF,"[Sie sind Tod [Mord/Unfall]");
    return 1;
    }


    public OnVehicleSpawn(vehicleid)
    {
    return 1;
    }


    public OnVehicleDeath(vehicleid, killerid)
    {
    return 1;
    }


    public OnPlayerText(playerid, text[])
    {
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])


    {
    if (strcmp("/help", cmdtext, true, 10) == 0)
    {
    SendClientMessage(playerid,0xF50000FF," ");
    SendClientMessage(playerid,0x00B9FFFF,"••••Account•••• /stats /login /changepass /buylevel /rules");
    SendClientMessage(playerid,0xF0F0F0FF,"••••Allgemeines•••• /pay /time /buy /showperso /id /drink /shwolicenses /members");
    SendClientMessage(playerid,0xF0F0F0FF,"••••Allgemeines•••• /buygun /skill /licenses /lotto /spawnchange");
    SendClientMessage(playerid,0xF0F0F0FF,"••••Allgemeines•••• /showfinances /cancel /accept /eject /usedrugs /contract /fill /filllcar /get fuel");
    SendClientMessage(playerid,0xF0F0F0FF,"••••Allgemeines•••• /shwome /lehrer /showoilprice /gebietinfo /tognews /togfam");
    SendClientMessage(playerid,0xF0F0F0FF,"••••Anderes•••• /rentcar /rentbike /hangup /call /househelp /renthelp /leaderhelp");
    SendClientMessage(playerid,0xF0F0F0FF,"••••Anderes•••• /cookhelp /fishhelp /ganghelp /onlinehelp");
    SendClientMessage(playerid,0xF0F0F0FF,"••••Chat•••• /(A)dmin /(sup)port /(s)shout /(c)lose /(f)amily /me");
    SendClientMessage(playerid,0xF0F0F0FF,"••••Bank•••• /givecheck /usecheck /dropcheck /balance /withdraw /deposit /wiretransfare");
    return 1;
    }
    if (strcmp("/rules", cmdtext, true, 10) ==0)
    {
    SendClientMessage(playerid,0xF50000FF," ");
    SendClientMessage(playerid,0xF50000FF," ");
    SendClientMessage(playerid,0xF50000FF," ");
    SendClientMessage(playerid,0xF50000FF," _________________________________________________________________");
    SendClientMessage(playerid,0xF50000FF,"| Für Informationen zu den Regeln schaue doch mal im Forum vorbei ");
    SendClientMessage(playerid,0xF50000FF,"| http://german-realive-at-grl.dyndns.org/wcf2/ ");
    SendClientMessage(playerid,0xF50000FF,"|_________________________________________________________________");
    SendClientMessage(playerid,0xF50000FF," ");
    SendClientMessage(playerid,0xF50000FF," ");
    SendClientMessage(playerid,0xF50000FF," ");


    return 1;
    }
    return 0;
    }


    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
    {
    return 1;
    }


    public OnPlayerExitVehicle(playerid, vehicleid)
    {
    return 1;
    }


    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    return 1;
    }


    public OnPlayerEnterCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerLeaveCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerEnterRaceCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerLeaveRaceCheckpoint(playerid)
    {
    return 1;
    }


    public OnRconCommand(cmd[])
    {
    return 1;
    }


    public OnPlayerRequestSpawn(playerid)
    {
    return 1;
    }


    public OnObjectMoved(objectid)
    {
    return 1;
    }


    public OnPlayerObjectMoved(playerid, objectid)
    {
    return 1;
    }


    public OnPlayerPickUpPickup(playerid, pickupid)
    {
    return 1;
    }


    public OnVehicleMod(playerid, vehicleid, componentid)
    {
    return 1;
    }


    public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
    {
    return 1;
    }


    public OnVehicleRespray(playerid, vehicleid, color1, color2)
    {
    return 1;
    }


    public OnPlayerSelectedMenuRow(playerid, row)
    {
    return 1;
    }


    public OnPlayerExitedMenu(playerid)
    {
    return 1;
    }


    public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
    {
    return 1;
    }


    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    return 1;
    }


    public OnRconLoginAttempt(ip[], password[], success)
    {
    return 1;
    }


    public OnPlayerUpdate(playerid)
    {
    return 1;
    }


    public OnPlayerStreamIn(playerid, forplayerid)
    {
    return 1;
    }


    public OnPlayerStreamOut(playerid, forplayerid)
    {
    return 1;
    }


    public OnVehicleStreamIn(vehicleid, forplayerid)
    {
    return 1;
    }


    public OnVehicleStreamOut(vehicleid, forplayerid)
    {
    return 1;
    }


    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    return 1;
    }


    public OnPlayerClickPlayer(playerid, clickedplayerid, source)
    {
    return 1;
    }


    public Tutorial(playerid)
    {
    if(TutTime[playerid] >= 1) // wenn die Zeit auf 1 gesetzt worden war, gehts los. Wenn während des Tutorials die zeit wieder auf 0 gesetzt wird, passiert in dem Timer garnichts.
    {
    if(TutTime[playerid] == 2)// hier wird abgefragt wieviel Sekunden seit dem Start des Tutorials verstrichen sind
    {
    SendClientMessage(playerid,msg,"*~'__(Tutorial: Willkommen!)__'~*");

    Wolte son Tutorial installieren aber irgend wie sagt der das hier


    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(270) : error 029: invalid expression, assumed zero
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(270) : warning 215: expression has no effect
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(270) : error 001: expected token: ";", but found ")"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(270) : error 029: invalid expression, assumed zero
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(270) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.
    Die zeile die er meint (270) sieht so aus


    SQL
    SendClientMessage(playerid,msg,"*~'__(Tutorial: Willkommen!)__'~*");

    Wenn ich das darein mache bekommen ich exe Oo


    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(96) : error 017: undefined symbol "dcmd"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(97) : error 055: start of function body without function header
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(97 -- 116) : error 010: invalid function or declaration
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(97 -- 128) : error 010: invalid function or declaration
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(97 -- 128) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    5 Errors.

    So ahbe ich gemacht aber nun kommen noch ein paar errors, ich zeige euch die mal.


    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(269) : error 029: invalid expression, assumed zero
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(269) : warning 215: expression has no effect
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(269) : error 001: expected token: ";", but found ")"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(269) : error 029: invalid expression, assumed zero
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(269) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.





    Und dann muss noch das hier irgendwo hin , weiß aber nicht wohin ?(


    pFirstLog[playerid] = true;


    wo kommt das hin ich weiß es nicht xD

    pFirstLog[playerid] = true;
    Brauche hilfe. KApiere nicht wo das hinkommen soll. ?(
    Weil ich das noch nicht eingefügt habe kommen bestimmt auch die errors hier oder?
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(270) : error 029: invalid expression, assumed zero
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(270) : warning 215: expression has no effect
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(270) : error 001: expected token: ";", but found ")"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(270) : error 029: invalid expression, assumed zero
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(270) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.

    Weiß jemand darauf eine ANtwort?


    Und noch etwas; Und zwar bei einem Komplett neuen Script ist das ja so das wenn man redet (also was im chat schreibt) das dort einfach nur steht z.B: Spieler xxx: (text)
    Wie scripte ich das das da nicht einfach nur steht : Spieler xxx: (Text) sondern : Spielerxxx sagt: (text) ? Und nathrülich wie scripte ich den befehle für spielerxxx schreit: (text) (vor dem text muss man dann /s (text) machen.



    mfg

    Wie scripte ich das so das die namen von den Member alle weiß sind?
    Also z.b. Spielerxxx sagt: lalala


    Also das wircklich alle namen auch im Chat weiß sind und nicht Bunt?


    Und noch etwas; Und zwar bei einem Komplett neuen Script ist das ja so das wenn man redet (also was im chat schreibt) das dort einfach nur steht z.B: Spieler xxx: (text)
    Wie scripte ich das das da nicht einfach nur steht : Spieler xxx: (Text) sondern : Spielerxxx sagt: (text) ? Und nathrülich wie scripte ich den befehle für spielerxxx schreit: (text) (vor dem text muss man dann /s (text) machen.


    Oder kennt ihr ein Tutorial wo es erklärt wird im Forum oder irgendwo?


    Mfg :thumbup:

    So ahbe ich gemacht aber nun kommen noch ein paar errors, ich zeige euch die mal.


    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(269) : error 029: invalid expression, assumed zero
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(269) : warning 215: expression has no effect
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(269) : error 001: expected token: ";", but found ")"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(269) : error 029: invalid expression, assumed zero
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(269) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.




    Und dann muss noch das hier irgendwo hin , weiß aber nicht wohin ?(


    pFirstLog[playerid] = true;


    wo kommt das hin ich weiß es nicht xD

    Hier habe ein paar errors. Wie bekomme ich sie weg? :thumbdown:


    mfg


    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(268) : error 017: undefined symbol "msg"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(269) : error 017: undefined symbol "msg"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(270) : error 017: undefined symbol "msg"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(274) : error 017: undefined symbol "msg"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(275) : error 017: undefined symbol "msg"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(276) : error 017: undefined symbol "msg"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(277) : error 017: undefined symbol "msg"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(278) : error 017: undefined symbol "msg"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(282) : error 017: undefined symbol "msg"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(283) : error 017: undefined symbol "msg"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(284) : error 017: undefined symbol "msg"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(285) : error 017: undefined symbol "msg"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(289) : error 017: undefined symbol "msg"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(290) : error 017: undefined symbol "msg"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(291) : error 017: undefined symbol "msg"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(292) : error 017: undefined symbol "msg"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(293) : error 017: undefined symbol "msg"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(294) : error 017: undefined symbol "msg"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(298) : error 017: undefined symbol "msg"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(299) : error 017: undefined symbol "msg"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(300) : error 017: undefined symbol "msg"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(301) : error 017: undefined symbol "msg"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(302) : error 017: undefined symbol "msg"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(303) : error 017: undefined symbol "msg"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(307) : error 017: undefined symbol "msg"
    C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\tutorial.pwn(308) : error 017: undefined symbol "msg"

    Wie kommst du jetzt dadrauf? :D


    /EDIT Naja irgendwie bekomm ich es nicht gescriptet obwohl ich sowas schonmal gescriptet hab :/ aber ich bekomms nicht nochmal hin xD :thumbdown: