Jump to content

comanda sistem spray


iReaLx

Recommended Posts

Salutare, am copiat un sistem de spray dintr un gm in altul si imi da urmatoarele erori:

 

(10059) : error 010: invalid function or declaration
(25097) : error 017: undefined symbol "GraffitiInfo"
(25097) : warning 215: expression has no effect
(25097) : error 001: expected token: ";", but found "]"
(25097) : error 029: invalid expression, assumed zero
(25097) : fatal error 107: too many error messages on one line

 

Uitati si codurile : 

Primul cod : 

if(StartedSpray[playerid] > 0)
{
    DisablePlayerCheckpoint(playerid);
    ClanProces[playerid] = 0;
    StartedSpray[playerid] = 0;
    StartedSpray2[playerid] = 0;
    StartedSprayOn[playerid] = 0;
    SCM(playerid, COLOR_ROB, "Ai fost omorat, iar procesul de scris pe perete a fost sters.");
}

 

Al doilea cod :

CMD:spray(playerid, params[])
{
    new clanid = PlayerInfo[playerid][pClan], string[256];
    if(clanid == 0) return SendClientMessage(playerid, COLOR_WHITE, "You aren't in a clan.");
    if(ClanDuty[playerid] == 0) return SCM(playerid,-1,"You are not on clan duty!");
    if(StartedSpray2[playerid] == 1) return 1;
    if(StartedSpray[playerid] == 0) ClanProces[playerid] = 0;
    for(new h = 0; h < 21; h++) {
        if(PlayerToPoint(8.0, playerid, GraffitiInfo[h][gfX], GraffitiInfo[h][gfY], GraffitiInfo[h][gfZ])) {
            if(StartedSprayOn[playerid] != 0 && StartedSprayOn[playerid] != h) {
                SCM(playerid, -1, "{F22B2B}#Peretele pe care vrei sa folosesti aceasta comanda, este diferit fata de primul!");
            }
            else if(GraffitiInfo[h][gfOwned] == PlayerInfo[playerid][pClan]) {
                SCM(playerid, -1, "{F22B2B}#Acest perete apartine clanului tau.");
            }
            /*else if(GraffitiInfo[StartedSprayOn[playerid]][gfAttacked] != 0 && StartedSprayOn[playerid] != GraffitiInfo[h][gfAttacked])
            {
                SendClientMessage(playerid, -1, "#Cineva deja scrie pe acest perete!");
            }*/
            else {
                if(StartedSpray[playerid] == 0) {
                    if(GraffitiInfo[h][gfOwned] == 0) format(string, sizeof(string), "Ai inceput sa scrii pe peretele cu id-ul %d, detinut de catre server.", h);
                    else format(string, sizeof(string), "Ai inceput sa scrii pe peretele cu id-ul %d, detinut de clanul: %s", h, ClanInfo[GraffitiInfo[h][gfOwned]][cClanName]);
                    SCM(playerid, COLOR_LIGHTRED, string);
                    GraffitiInfo[h][gfAttacked] = clanid;
                    format(string, sizeof(string), "{F22B2B}%s (din clanul %s) a inceput sa scrie pe peretele clanului tau (turf id %d).", GetName(playerid), ClanInfo[PlayerInfo[playerid][pClan]][cClanName], h);
                    SendClanMessage(GraffitiInfo[h][gfOwned], string);
                }
                GivePlayerWeapon(playerid, 41, 10000);
                ApplyAnimation(playerid,"SPRAYCAN","spraycan_full",4.0,0,0,0,0,0);
                SetTimerEx( "FinalProces", 4000, 0, "d", playerid );
                StartedSpray[playerid] = 1;
                StartedSpray2[playerid] = 1;
                StartedSprayOn[playerid] = h;
            }
        }
    }
    return 1;
}

 

 

 

Link to comment
Share on other sites

Acum 21 ore, iReaLx a spus:

Salutare, am copiat un sistem de spray dintr un gm in altul si imi da urmatoarele erori:

 

(10059) : error 010: invalid function or declaration
(25097) : error 017: undefined symbol "GraffitiInfo"
(25097) : warning 215: expression has no effect
(25097) : error 001: expected token: ";", but found "]"
(25097) : error 029: invalid expression, assumed zero
(25097) : fatal error 107: too many error messages on one line

 

Uitati si codurile : 

Primul cod : 

if(StartedSpray[playerid] > 0)
{
    DisablePlayerCheckpoint(playerid);
    ClanProces[playerid] = 0;
    StartedSpray[playerid] = 0;
    StartedSpray2[playerid] = 0;
    StartedSprayOn[playerid] = 0;
    SCM(playerid, COLOR_ROB, "Ai fost omorat, iar procesul de scris pe perete a fost sters.");
}

 

Al doilea cod :

CMD:spray(playerid, params[])
{
    new clanid = PlayerInfo[playerid][pClan], string[256];
    if(clanid == 0) return SendClientMessage(playerid, COLOR_WHITE, "You aren't in a clan.");
    if(ClanDuty[playerid] == 0) return SCM(playerid,-1,"You are not on clan duty!");
    if(StartedSpray2[playerid] == 1) return 1;
    if(StartedSpray[playerid] == 0) ClanProces[playerid] = 0;
    for(new h = 0; h < 21; h++) {
        if(PlayerToPoint(8.0, playerid, GraffitiInfo[h][gfX], GraffitiInfo[h][gfY], GraffitiInfo[h][gfZ])) {
            if(StartedSprayOn[playerid] != 0 && StartedSprayOn[playerid] != h) {
                SCM(playerid, -1, "{F22B2B}#Peretele pe care vrei sa folosesti aceasta comanda, este diferit fata de primul!");
            }
            else if(GraffitiInfo[h][gfOwned] == PlayerInfo[playerid][pClan]) {
                SCM(playerid, -1, "{F22B2B}#Acest perete apartine clanului tau.");
            }
            /*else if(GraffitiInfo[StartedSprayOn[playerid]][gfAttacked] != 0 && StartedSprayOn[playerid] != GraffitiInfo[h][gfAttacked])
            {
                SendClientMessage(playerid, -1, "#Cineva deja scrie pe acest perete!");
            }*/
            else {
                if(StartedSpray[playerid] == 0) {
                    if(GraffitiInfo[h][gfOwned] == 0) format(string, sizeof(string), "Ai inceput sa scrii pe peretele cu id-ul %d, detinut de catre server.", h);
                    else format(string, sizeof(string), "Ai inceput sa scrii pe peretele cu id-ul %d, detinut de clanul: %s", h, ClanInfo[GraffitiInfo[h][gfOwned]][cClanName]);
                    SCM(playerid, COLOR_LIGHTRED, string);
                    GraffitiInfo[h][gfAttacked] = clanid;
                    format(string, sizeof(string), "{F22B2B}%s (din clanul %s) a inceput sa scrie pe peretele clanului tau (turf id %d).", GetName(playerid), ClanInfo[PlayerInfo[playerid][pClan]][cClanName], h);
                    SendClanMessage(GraffitiInfo[h][gfOwned], string);
                }
                GivePlayerWeapon(playerid, 41, 10000);
                ApplyAnimation(playerid,"SPRAYCAN","spraycan_full",4.0,0,0,0,0,0);
                SetTimerEx( "FinalProces", 4000, 0, "d", playerid );
                StartedSpray[playerid] = 1;
                StartedSpray2[playerid] = 1;
                StartedSprayOn[playerid] = h;
            }
        }
    }
    return 1;
}

 

 

 

ai adaugat enum? ai defini acea variabila in functie de enum? (este la fel ca la enum ul pt player, case etc)

EDIT: daca deja aveai un enum pt clanuri si doar ai copiat sistenul de spray nu ai modificat acea variabila cu cea pe care o ai in GM

Edited by valivaly96
Link to comment
Share on other sites

37 minutes ago, valivaly96 said:

ai adaugat enum? ai defini acea variabila in functie de enum? (este la fel ca la enum ul pt player, case etc)

EDIT: daca deja aveai un enum pt clanuri si doar ai copiat sistenul de spray nu ai modificat acea variabila cu cea pe care o ai in GM

Am rezolvat o in mare parte... multumesc frumos !

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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