[HELP] Where is the error? help з_з - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Where is the error? help з_з (
/showthread.php?tid=186269)
[HELP] Where is the error? help з_з -
Capitan_Price - 28.10.2010
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?
Re: [HELP] Where is the error? help з_з -
LarzI - 28.10.2010
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.
Re: [HELP] Where is the error? help з_з -
<Weponz> - 28.10.2010
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)
Re: [HELP] Where is the error? help з_з -
LarzI - 28.10.2010
x_nr is the variable he uses for strtok, most certainly.
Re: [HELP] Where is the error? help з_з -
Capitan_Price - 30.10.2010
the comand is /steal (weapon, card, money, telephone) i don't use /tessera <.<