27.12.2010, 20:07
analisei bem o seu codigo agora espero ter arrumado
pawn Код:
if(strcmp(cmd,"/assaltar",true)==0)
{
if(PlayerInfo[playerid][pMembro] == 4 || PlayerInfo[playerid][pLider] == 4 ||PlayerInfo[playerid][pMembro] == 5 || PlayerInfo[playerid][pLider] == 5||PlayerInfo[playerid][pMembro] == 12 || PlayerInfo[playerid][pLider] == 12||PlayerInfo[playerid][pMembro] == 13 || PlayerInfo[playerid][pLider] == 13)
if(IsPlayerConnected(playerid)) {
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE, "USE:/assaltar [ID do Jogador]");
return 1;
}
//giveplayerid = strval(tmp);
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE, "USE:/assaltar [ID do Jogador]");
return 1;
}
new money = strval(tmp);
if(dindin < 1 || dindin > 1000) { SendClientMessage(playerid, COLOR_PURPLE, " preзo minino 1 $ e preзo maximo 1000 $"); return 1; }
if (IsPlayerConnected(giveplayerid)) {
if(giveplayerid != INVALID_PLAYER_ID) {
if (ProxDetectorS(5.0, playerid, giveplayerid)) {
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Voce roubou de %s $%d.", giveplayer, dindin);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s te Robou $%d Corra e Chame a Policia.", sendername, dindin);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "*%s acaba de roubar %s!", sendername,giveplayer);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerMoneyEx(playerid, dindin);
GivePlayerMoneyEx(giveplayerid, -dindin);
}
else {
SendClientMessage(playerid, COLOR_GREY, "Esse jogador Nгo perto de vocк!");
}
}
}
else {
SendClientMessage(playerid, COLOR_GREY, " Invalido ID/Name!");
return 1;
}
}
return 1;
}