Jump to content

Addons

Membru
  • Posts

    24
  • Joined

  • Last visited

    Never

Posts posted by Addons

  1. Ok, si cum modific SetPlayerCriminal ? :|

    [pawn]public SetPlayerCriminal(playerid,declare,reason[])

    {//example: SetPlayerCriminal(playerid,255, "Stealing A Police Vehicle");

    if(IsPlayerConnected(playerid))

    {

        PlayerInfo[playerid][pCrimes] += 1;

        new points = WantedPoints[playerid];

    new turned[MAX_PLAYER_NAME];

    new turner[MAX_PLAYER_NAME];

    new turnmes[128];

    new wantedmes[128];

    strmid(PlayerCrime[playerid][pAccusedof], reason, 0, strlen(reason), 255);

    GetPlayerName(playerid, turned, sizeof(turned));

    if (declare == 255)

    {

    format(turner, sizeof(turner), "Neidentificat");

    strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);

    }

    else

    {

        if(IsPlayerConnected(declare))

        {

    GetPlayerName(declare, turner, sizeof(turner));

    strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);

    strmid(PlayerCrime[declare][pBplayer], turned, 0, strlen(turned), 255);

    strmid(PlayerCrime[declare][pAccusing], reason, 0, strlen(reason), 255);

    }

    }

    new wlevel;

    format(turnmes, sizeof(turnmes), "Ai comis o infractiune [%s]. Reclamant: %s.",reason,turner);

    SendClientMessage(playerid, COLOR_LIGHTRED, turnmes);

    if(points > 0)

    {

        new yesno;

    if(points >= 2 && points <= 3) { if(WantedLevel[playerid] != 1) { WantedLevel[playerid] = 1; wlevel = 1; yesno = 1; } }

    else if(points >= 4 && points <= 5) { if(WantedLevel[playerid] != 2) { WantedLevel[playerid] = 2; wlevel = 2; yesno = 1;  } }

    else if(points >= 6 && points <= 7) { if(WantedLevel[playerid] != 3) { WantedLevel[playerid] = 3; wlevel = 3; yesno = 1; } }

    else if(points >= 8 && points <= 9) { if(WantedLevel[playerid] != 4) { WantedLevel[playerid] = 4; wlevel = 4; yesno = 1; } }

    else if(points >= 10 && points <= 11) { if(WantedLevel[playerid] != 5) { WantedLevel[playerid] = 5; wlevel = 5; yesno = 1; } }

    else if(points >= 12 && points <= 13) { if(WantedLevel[playerid] != 6) { WantedLevel[playerid] = 6; wlevel = 6; yesno = 1; } }

    else if(points >= 14 && points <= 15) { if(WantedLevel[playerid] != 7) { WantedLevel[playerid] = 7; wlevel = 7; yesno = 1; } }

    else if(points >= 16 && points <= 17) { if(WantedLevel[playerid] != 8) { WantedLevel[playerid] = 8; wlevel = 8; yesno = 1; } }

    else if(points >= 18 && points <= 19) { if(WantedLevel[playerid] != 9) { WantedLevel[playerid] = 9; wlevel = 9; yesno = 1; } }

    else if(points >= 20 && points <= 21) { if(WantedLevel[playerid] != 10) { WantedLevel[playerid] = 10; wlevel = 10; yesno = 1; } }

    if(WantedLevel[playerid] >= 1) { if(gTeam[playerid] == 3) { gTeam[playerid] = 4; } }

    if(yesno)

    {

    format(wantedmes, sizeof(wantedmes), "Nivel urmarire curent: %d",wlevel);

    SendClientMessage(playerid, COLOR_YELLOW, wantedmes);

    for(new i = 0; i < MAX_PLAYERS; i++)

    {

    if(IsPlayerConnected(i))

    {

        if(PlayerInfo[pMember] == 1||PlayerInfo[pLeader] == 1||PlayerInfo[pMember] == 2||PlayerInfo[pLeader] == 2||PlayerInfo[pMember] == 3||PlayerInfo[pLeader] == 3)

        {

    format(cbjstore, sizeof(turnmes), "Dispecer: Toate unitatile: Reclamant: %s",turner);

    SendClientMessage(i, TEAM_BLUE_COLOR, cbjstore);

    format(cbjstore, sizeof(turnmes), "Dispecer: Infractiune: %s, Suspect: %s",reason,turned);

    SendClientMessage(i, TEAM_BLUE_COLOR, cbjstore);

    }

    }

    }

    }

    }

    }//not connected

    }[/pawn]

  2. Bai, esti un geniu! Cum ai putut sa-ti dai seama? Stiu si eu ce inseamna "simbol deja definit", dar problema e ca eroarea a aparut dupa ce am adaugat un sistem de war! O sa ma uit mai atent la toate strtok, cu voi nu e de facut nimic :-j.

    Ceea ce am g?sit:

    OnPlayerCommandText:

    cmd = strtok(cmdtext, idx);

    apoi la fiecare comand? (aproape):

    tmp = strtok(cmdtext, idx); ?i cam atât despre strtok. :| Unde dracu' e deja definit c? înainte astea mergeau perfect, iar sistemul care l-am adaugat eu nici macar nu con?inea strtok. :|

  3. 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;
    }
    G:\X.rar\gamemodes\X.pwn(9697) : error 021: symbol already defined: "strtok"
    G:\X.rar\gamemodes\X.pwn(9712) : error 047: array sizes do not match, or destination array is too small
    Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase
    
    
    2 Errors

    Linia 9697 - { de sub strtok

    Linia 9712 - return result

  4. 'Nea?a,

    Am 2 comenzi care nu func?ioneaz? de nicio culoare.

    /unbanip:

    PAWN Code : [select]

    [pawn]if(strcmp(cmd,"/unbanip",true)==0)

    {

    if(PlayerInfo[playerid][pAdmin] >= 5)

    {

        tmp = strtok(cmdtext,idx);

        if(!strlen(tmp))

        {

            SendClientMessage(playerid,COLOR_GRAD1,"Foloseste: /unbanip [jucator ip]");

            return 1;

      }

    format(string,sizeof(string),"bans/%s.ini",tmp);

    fremove(string);

              format(string,sizeof(string),"unbanip %s",tmp);

    SendRconCommand(string);

    SendRconCommand("reloadbans");

      GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));

    GetPlayerName(playerid, sendername, sizeof(sendername));

    format(string, 256, "AdmCmd: %s a scos ban-ul de pe ip-ul "ALB"%s", sendername, tmp);

    ABroadCast(0xFF5555FF,string,1);

    }

    return 1;

    }[/pawn]

    /unban:

    PAWN Code : [select]

    [pawn]if (strcmp(cmd, "/unban", true)==0)

    {

          giveplayerid = ReturnUser(tmp);

    if(PlayerInfo[playerid][pAdmin] >= 6)

    {

    tmp = strtok(cmdtext, idx);

    if(!strlen(tmp))

    {

    SendClientMessage(playerid, COLOR_GRAD1, ""ALBASTRU2"Tasteaza: "ALB"/unban [PlayerName]");

    return 1;

    }

      GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));

    GetPlayerName(playerid, sendername, sizeof(sendername));

    format(string, 256, "AdmCmd: %s i-a scos ban-ul lui %s", sendername,tmp);

    ABroadCast(0xFF0000FF,string,1);

    format(string, 256, "AdmCmd: %s i-a scos ban-ul lui %s", sendername,tmp);

    printf(string);

    SendClientMessage(playerid, COLOR_GRAD1, "Jucator unbanat!");

    }

    return 1;

    }

    [/pawn]

    Le-am modificat în toate modurile, nu ?tiu ce s? le mai fac.

    Dac? ave?i alte comenzi mai bune, nu m-a? sup?ra s? le oferi?i (DCMD/ZCMD)!

    Thanks!

  5. 1. Am vazut la multe servere ca atunci cand te duci in locuri importante (LSPD, primarie, hq factiuni etc) iti apare in coltul ecran-ului asa:

    2nss8c7.jpg ( depinde de locul unde te afli )

    Doresc sa stiu cum se numeste acest FS si de unde il pot descarca ?

    2. Cum pot creea si eu acest pickup + text-ul de deasupra lui ?

    fxbdyf.jpg

  6. 1. Le am

    2. Oh, god, nimeni nu intelege ? :| Afurisitul ala de nume "bLeNd" e scris cu culoarea rosu carmin, culoare care reprezenta BLOODS GANG ( ma refer la culoarea care apare la /factions, /leaders, culorile masinilor factiunilor etc.), am modificat culoarea la /factions, /leaders si la masinile factiunilor, dar daca imi dau invite in bloods gang, apas 'T' si scriu o chestie, numele imi apare cu culoarea rosu carmin, care era defapt culoarea veche de la bloods gang, cum as putea sa o schimb si pe ea in ROZ ? Acum ai inteles ? :-w

    3. Asta a fost primul lucru care l-am facut, am dat find, dar nu am gasit nimic, iar faza cu google, cum sa traduc daca nu gasesc in GM ce sa traduc ?

  7. Salut,

    Problema 1:

    Acum cateva zile, am dat si eu un ochi prin gamemod-urile postate de voi, si mi-am luat si eu unul. Toate bune si frumoase, pana cand din greseala intru intr-o masina a factiunii " Nortenos " ( eu eram civil ), imi scrie " Nu faci parte din..bla bla " ma scoate din masina, dar observ ca nu mai pot sa ma misc ( am incercat /stopani, space, enter, tot ce era posibil, dar nimic ), dupa cateva minute bune incerc /unfreeze, si ce sa vezi, merge, dar pe mine nu ma avantajeaza deloc sa dau unfreeze de fiecare data cand intru intr-o masina a altei factiuni. Intrebarea mea este: cum as putea nu ma mai blocheze cand intru in masina ?

    Problema 2:

    166nqkz.jpg

    Deci, numele "bLeNd" este scris cu culoarea rosu carmin, culoare pe care Bloods Gang o avea inainte, am schimbat culoarea la bloods in roz, iar acum acel rosu carmin apare daca sunt membru bloods si scriu ceva in chat, cum as putea sa schimb si culoarea numelui celui care scrie pe chat in roz ?

    Problema 3:

    ym87s.jpg

    Chestia care am inconjurat-o cu culoarea rosie, imi apare cand deschid serverul, why ?

×
×
  • 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.