28.10.2010, 12:06
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;
}
why do not steal the card?