Jump to content
  • 0

Newbie


Shaolinu

Question

Problema intalnita (descriere):Deci eu am un chat.. Newbie.. pentru helperi si playeri.. asa.. stiti voi.. dar am o problema..daca dau /newbie (eu fiind player) imi pune intrebarea dar mi-o arata la toti on pe server.. si asta ma deranjeaza..Ati putea sa ma ajutati in legatura cu asta? eu vreau doar asa.. sa vada doar player-helperi. Si daca cineva chiar ar putea sa ma ajute.. sa imi explice/sau un tutorial daca exista cum as putea sa fac de ex: /n ajutor m-am blocat.. Si ca helper sa dau /accepthelp 0 si sa intre doar ei intr-o convorbire printr-o comanda..asta doar daca vrea cineva.Multumesc
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul(obligatoriu):

Citat

CMD:newbie(playerid, params[])
{
    new msg[128];
    if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "Tu nu esti logat si nu poti sa folosesti aceasta comanda!");
    if(sscanf(params,"s[128]", msg)) return SendClientMessage(playerid, COLOR_SYN,"Tasteaza:{FFFFFF} (/n)ewbie <message>");
    {
        if(PlayerInfo[playerid][pLevel] > 10 && PlayerInfo[playerid][pAdmin] == 0 && PlayerInfo[playerid][pHelper] == 0) return SendClientMessage(playerid, COLOR_ERROR, "Nivelul tau este prea mare pentru a folosi acest chat.");
        if(TogNewbie == 1) return SendClientMessage(playerid, COLOR_ERROR, "Newbie este inchis.");
        if(NewbieTime[playerid] > 0)
        {
            format(gString, sizeof(gString), "Trebuie sa astepti %d pentru a pune din nou o intrebare.",  NewbieTime[playerid]);
            SendClientMessage(playerid, COLOR_SYN2, gString);
            return 1;
        }
        
        new string2[128];

          if(FindAdvertise(msg))
        {
            format(gString, sizeof(gString), "Staff:{FFFFFF} %s a scris: %s", GetName(playerid), msg);
            ABroadCast(COLOR_LIGHTRED, gString, 1); SendClientMessage(playerid, COLOR_SYN, "* Sistemul a detectat o reclama in mesajul tau! Administratorii au fost informati."); Kick(playerid);
            return 1;
        }
        for(new i=0; i<MAX_ENTRY; i++)
        {
         if(!Swear[0]) continue;
        Cenzura(msg,Swear);
        }
        if(PlayerInfo[playerid][pAdmin] == 8) format(gString, sizeof(gString), "[NC] Scripter %s: {FFFFFF}%s", GetName(playerid), msg);
        else if(PlayerInfo[playerid][pAdmin] == 6) format(gString, sizeof(gString), "[NC] Owner %s: {FFFFFF}%s", GetName(playerid), msg);
        else if(PlayerInfo[playerid][pAdmin] == 5) format(gString, sizeof(gString), "[NC] Co-Owner %s: {FFFFFF}%s", GetName(playerid), msg);
        else if(PlayerInfo[playerid][pAdmin] == 4) format(gString, sizeof(gString), "[NC] Admin 4 %s: {FFFFFF}%s", GetName(playerid), msg);
        else if(PlayerInfo[playerid][pAdmin] == 3) format(gString, sizeof(gString), "[NC] Admin 3 %s: {FFFFFF}%s", GetName(playerid), msg);
        else if(PlayerInfo[playerid][pAdmin] == 2) format(gString, sizeof(gString), "[NC] Admin 2 %s: {FFFFFF}%s", GetName(playerid), msg);
        else if(PlayerInfo[playerid][pAdmin] == 1) format(gString, sizeof(gString), "[NC] Admin 1 %s: {FFFFFF}%s", GetName(playerid), msg);
        else if(PlayerInfo[playerid][pHelper] > 0) format(gString, sizeof(gString), "[NC] Helper %s: {FFFFFF}%s", GetName(playerid), msg);
        else format(gString, sizeof(gString), "[N] Newbie %s: {FFFFFF}%s", GetName(playerid), msg);
        if(strlen(gString) > 120)
        {
            strmid(string2, gString, 110, 256);
            strdel(gString, 110, 256);

            format(gString,128,"%s ...",gString);
            NewbieChat(COLOR_NEWBIE, gString);

            format(string2,128,"... %s",string2);
            NewbieChat(COLOR_NEWBIE, string2);
        }
        else
        {
            NewbieChat(COLOR_NEWBIE, gString);
        }
        if(PlayerInfo[playerid][pHelper] == 0 && PlayerInfo[playerid][pAdmin] == 0) NewbieTime[playerid] = 10;
    }
    return 1;
}


Imagini / Video (optional): -
Ati incercat sa rezolvati singur?:  Nush ce sa scriu

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0
Chiar acum, Gireada a spus:

Arata-ne NewbieChat

Citat

function NewbieChat(color, msg[])
{
     foreach(new i : Player)
    {
        if(PlayerInfo[pLevel] <= 3 || PlayerInfo[pAdmin] > 0 || PlayerInfo[pHelper] > 0)
        {
            SendClientMessage(i, color, msg);
        }
    }
    return 1;
}
 

asta?

Link to comment
Share on other sites

  • 0

am observat ca ai postat o gramada de topicuri de genul ajutor scripting, chear daca te-am ajuta tu tot vei posta si multe altele.

daca nu te straduesti sa faci de unul singur mai bine nu te mai apuca sau mai bine plateste un scripter e mult mai simplu!

Edited by Geani

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

  • 0

T/C 

Ai cel puțin 2-3 topicuri pe zi în care nici măcar nu încerci sa faci ceva, de acum când faci un topic arati si ce ai încercat, cum te.ai străduit, altfel close.

**********************************

Servicii Scripting de calitate:

*********************************

Future Project: ExpertGame

*********************************

Link to comment
Share on other sites

  • -1
function NewbieChat(color, msg[])
{
     foreach(new i : Player)
    {
        if(PlayerInfo[i][pLevel] <= 3 || PlayerInfo[i][pAdmin] > 0 || PlayerInfo[i][pHelper] > 0)
        {
            SendClientMessage(i, color, msg);
        }
    }
    return 1;
}

@Gireada PlayerInfo trebuie sa contina si playerid cat si o variabila , era gresita. Totusi ma mira faptul ca nu a zis nimic de nici o eroare/warning.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.