[HELP] Where is the error? help з_з
#1

pawn Код:
else if(strcmp(x_nr,"tessera",true) == 0)
                {
                    tmp = strtok(cmdtext, idx);
                    if(!strlen(tmp))
                    {
                        SendClientMessage(playerid, COLOR_WHITE, "USO: /ruba tessera [playerid/PartOfName]");
                        return 1;
                    }
                    giveplayerid = ReturnUser(tmp);
                    if(PlayerTied[playerid] == 1)
                    if(Svenuto[playerid] == 1)
                    {
                        if(TesseraR[giveplayerid]==0)
                        {
                            SendClientMessage(playerid, COLOR_GREY, "   Il giocatore non ha una tessera!");
                            return 1;
                        }
                        if(TesseraR[playerid]==1)
                        {
                            SendClientMessage(playerid, COLOR_GREY, "   Hai giа una tessera del casinт!");
                            return 1;
                        }
                        if (ProxDetectorS(3.0, playerid, giveplayerid))
                        {
                            GetPlayerName(playerid, sendername, sizeof(sendername));
                            GetPlayerName(giveplayerid, playername, sizeof(playername));
                            if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "    Non puoi rubarti da solo!"); return 1; }
                            format(string, sizeof(string), "* Hai preso la tessera del casinт di %s.", giveplayer);
                            SendClientMessage(playerid, COLOR_WHITE, string);
                            SendClientMessage(playerid, COLOR_GREEN, "* Ora hai accesso al caveou del casinт Four Leaf.");
                            format(string, sizeof(string), "* %s ti ha rubato la tessera del casinт.", sendername);
                            SendClientMessage(giveplayerid, COLOR_WHITE, string);
                            TesseraR[giveplayerid]=1;
                            TesseraR[playerid]=0;
                        }
                        else
                        {
                            SendClientMessage(playerid, COLOR_GREY, "   Il giocatore non и vicino a te!");
                            return 1;
                        }
                    }
                    else return SendClientMessage(playerid,COLOR_GREY,"   Non puoi rubare la tessera a questo giocatore!");
                    return 1;
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GREY, "   Oggetto sconosciuto!");
                    return 1;
                }
            }
        }
        return 1;
    }
Where is the error in this cmd?
why do not steal the card?
Reply
#2

Do you think we magically can figure out what's wrong with this code, when you don't provide us any information or goals?

Explain better.
Reply
#3

I see a error i think..

Change this
Код:
else if(strcmp(x_nr,"tessera",true) == 0)
to
Код:
else if(strcmp(x_nr,"/tessera",true) == 0)
EDIT: a wth is x_nr? Did u rename cmdtext? it looks like it should be cmdtext..

It should look like this:

Код:
if(strcmp(cmdtext,"/tessera",true) == 0)
Reply
#4

x_nr is the variable he uses for strtok, most certainly.
Reply
#5

the comand is /steal (weapon, card, money, telephone) i don't use /tessera <.<
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)