Szerző Téma: Prefix  (Megtekintve 1258 alkalommal)

Nem elérhető Sanyko

  • 324
    • Profil megtekintése
Prefix
« Dátum: 2016. Május 29. - 10:37:21 »
0
Sziasztok!Van egy PPC-modom és olyant szeretnék bele hogy ha chatbe ír valaki akkor előtte legyen ott hogy ő mi. pl [Tulajdonos]Sanyko Sziasztok ezt szeretném megcsinálni. Tudnátok segíteni?

Nem elérhető ZSOLTI99

  • 1827
    • Profil megtekintése
Prefix
« Válasz #1 Dátum: 2016. Május 29. - 10:44:52 »
0

Nem elérhető Sanyko

  • 324
    • Profil megtekintése
Prefix
« Válasz #2 Dátum: 2016. Május 29. - 10:57:37 »
0
Idézetet írta: ZSOLTI99 date=1464511492\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"60623\" data-ipsquote-contentclass=\"forums_Topic
https://sampforum.hu/index.php?page=scripts&to=&by=&sn=prefix
 
Hát nem erre gondoltam.
Hanem ilyesmire csak ez nem jó mert error-os
 
public OnPlayerText(playerid, text[])
{
    new format[128], nev[MAX_PLAYER_NAME], admin[32];
    GetPlayerName(playerid, nev, sizeof (nev));
       
        switch(ADMINVÁLTOZÓD) //ÍRD ÁT MAJD!
        {
                case 0: admin = \"Játékos\";
                case 1: admin = \"VIP\";
                case 2: admin = \"Moderátor\";
                case 3: admin = \"Admin\";
                case 4: admin = \"Fõadmin\";
                case 5: admin = \"Scripter\";
                case 6: admin = \"Tulaj\";
        }
       
    format(format, sizeof (format), \"(%d)%s[%s]: %s\", playerid, nev, admin, text);
    SendPlayerMessageToAll(playerid, format);
    return 0;
}

Nem elérhető Lofoli

  • 296
    • Profil megtekintése

Prefix
« Válasz #4 Dátum: 2016. Május 29. - 11:02:45 »
0
Erroros? Végülis csak full nagybetűvel van odaírva, hogy írd át a változót.....

Nem elérhető Sanyko

  • 324
    • Profil megtekintése
Prefix
« Válasz #5 Dátum: 2016. Május 29. - 11:09:41 »
0
Idézetet írta: blackdog476 date=1464512565\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"60623\" data-ipsquote-contentclass=\"forums_Topic
Erroros? Végülis csak full nagybetűvel van odaírva, hogy írd át a változót.....
 
Átírtam mégpedig AdminLevelName (Ezt csak úgy beírtam mert nem tudom mit kell oda)

Prefix
« Válasz #6 Dátum: 2016. Május 29. - 11:19:22 »
0
Oda azt a változót kell írnod, amiben tárolod az adott player adminszintjét.  :wall:
Nem csak be kell írni valamit oda.  :facepalm:

Nem elérhető Sanyko

  • 324
    • Profil megtekintése
Prefix
« Válasz #7 Dátum: 2016. Május 29. - 11:24:57 »
0
Idézetet írta: zsoolt997 date=1464513562\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"60623\" data-ipsquote-contentclass=\"forums_Topic
Oda azt a változót kell írnod, amiben tárolod az adott player adminszintjét.  :wall:
Nem csak be kell írni valamit oda.  :facepalm:
 

C:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(10806) : warning 217: loose indentation
C:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20207) : warning 219: local variable \"format\" shadows a variable at a preceding level
C:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20210) : warning 217: loose indentation
C:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20220) : warning 217: loose indentation
C:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20220) : error 012: invalid function call, not a valid address
C:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20220) : warning 215: expression has no effect
C:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20220) : warning 215: expression has no effect
C:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20220) : warning 215: expression has no effect
C:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20220) : warning 215: expression has no effect
C:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20220) : warning 215: expression has no effect
C:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20220) : warning 215: expression has no effect
C:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20220) : warning 215: expression has no effect
C:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20220) : error 001: expected token: \";\", but found \")\"
C:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20220) : error 029: invalid expression, assumed zero
C:\\Documents and Settings\\GreenHemp\\Asztal\\samp03dsvr_R2_win32\\gamemodes\\PPC_Trucking.pwn(20220) : 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.

 
És így néz ki:
 
public OnPlayerText(playerid, text[])
{
    new format[128], nev[MAX_PLAYER_NAME], admin[32];
    GetPlayerName(playerid, nev, sizeof (nev));
        switch(PlayerLevel) //ÍRD ÁT MAJD!
        {
                case 0: admin = \"Játékos\";
                case 1: admin = \"Moderátor\";
                case 2: admin = \"Admin-segég\";
                case 3: admin = \"Admin\";
                case 4: admin = \"Főadmin\";
                case 5: admin = \"Tulajdonos\";
        }
    format(format, sizeof (format), \"(%d)%s[%s]: %s\", playerid, nev, admin, text);
    SendPlayerMessageToAll(playerid, format);
// Block the player\'s text if he has been muted
    if (APlayerData[playerid][Muted] == true)
{
// Let the player know he\'s still muted
SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Némítva vagy\");
// Don\'t allow his text to be sent to the chatbox
        return 0;
}
    return 1;
}

Nem elérhető ZSOLTI99

  • 1827
    • Profil megtekintése
Prefix
« Válasz #8 Dátum: 2016. Május 29. - 14:57:41 »
0
    new szoveg[128], nev[MAX_PLAYER_NAME], admin[32];
    GetPlayerName(playerid, nev, sizeof (nev));
    switch(PlayerLevel) //ÍRD ÁT MAJD!
    {
            case 0: admin = \"Játékos\";
            case 1: admin = \"Moderátor\";
            case 2: admin = \"Admin-segég\";
            case 3: admin = \"Admin\";
            case 4: admin = \"Főadmin\";
            case 5: admin = \"Tulajdonos\";
    }
    format(szoveg, sizeof (szoveg), \"(%d)%s[%s]: %s\", playerid, nev, admin, text);
    SendPlayerMessageToAll(playerid, szoveg);
        // Block the player\'s text if he has been muted
    if (APlayerData[playerid][Muted] == true)
    {
            // Let the player know he\'s still muted
            SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Némítva vagy\");
            // Don\'t allow his text to be sent to the chatbox
            return 0;
    }
    return 1;
}

Nem elérhető Sanyko

  • 324
    • Profil megtekintése
Prefix
« Válasz #9 Dátum: 2016. Május 29. - 16:09:09 »
0
Idézetet írta: ZSOLTI99 date=1464526661\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"60623\" data-ipsquote-contentclass=\"forums_Topic

    new szoveg[128], nev[MAX_PLAYER_NAME], admin[32];
    GetPlayerName(playerid, nev, sizeof (nev));
    switch(PlayerLevel) //ÍRD ÁT MAJD!
    {
            case 0: admin = \"Játékos\";
            case 1: admin = \"Moderátor\";
            case 2: admin = \"Admin-segég\";
            case 3: admin = \"Admin\";
            case 4: admin = \"Főadmin\";
            case 5: admin = \"Tulajdonos\";
    }
    format(szoveg, sizeof (szoveg), \"(%d)%s[%s]: %s\", playerid, nev, admin, text);
    SendPlayerMessageToAll(playerid, szoveg);
        // Block the player\'s text if he has been muted
    if (APlayerData[playerid][Muted] == true)
    {
            // Let the player know he\'s still muted
            SendClientMessage(playerid, 0xFFFFFFFF, \"{FF0000}Némítva vagy\");
            // Don\'t allow his text to be sent to the chatbox
            return 0;
    }
    return 1;
}

 

Majdnem jó. http://www.kephost.com/image/cOul Ha írok ezt írja

Nem elérhető ZSOLTI99

  • 1827
    • Profil megtekintése
Prefix
« Válasz #10 Dátum: 2016. Május 29. - 16:34:06 »
0
Akkor töröld ki a név lekérőt!
Másik meg felesleges beírni külön a rangokat mikor már be van 1x írva a PPC_Defines be csak le kell kérdezni őket oszt csá
« Utoljára szerkesztve: 2016. Május 29. - 16:36:11 írta ZSOLTI99 »

Nem elérhető Sanyko

  • 324
    • Profil megtekintése
Prefix
« Válasz #11 Dátum: 2016. Május 29. - 16:41:11 »
0
Idézetet írta: ZSOLTI99 date=1464532446\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"60623\" data-ipsquote-contentclass=\"forums_Topic
Akkor töröld ki a név lekérőt!
Másik meg felesleges beírni külön a rangokat mikor már be van 1x írva a PPC_Defines be csak le kell kérdezni őket oszt csá
 
Még mindig nem jó :( http://www.kephost.com/image/cOCl

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal