05.07.2013, 15:22
Hi. I've big problem with my command, i try everything, but no effect. I mean that when I use this command she work without "victim" and "player" will receive money.
Command:
PS: SOrry for my english, i'm romanian!
PS2: I will give rep. for solution!
Command:
Код:
//---------------------------------[STEAL MONEY-THIEVES]--------------------// if(strcmp(cmd, "/stealmoney", true) == 0) { if(PlayerInfo[playerid][pMember] + PlayerInfo[playerid][pLeader] == 7) { new victima = GetClosestPlayer(playerid); if(GetDistanceBetweenPlayers(playerid,victima) < 3) { if(StealTimer[playerid] == 1) { SendClientMessage(playerid, COLOR_WHITE, "* Asteapta 5 minute pentru a putea folosi din nou aceasta comanda!"); return 1; } SetTimerEx("StealReset", 300000, false, "i", playerid); new smoney = random(5000); new nume1[24]; new nume2[24]; GetPlayerName(victima, nume2, sizeof(nume2)); GetPlayerName(playerid, nume1, sizeof(nume1)); format(string, sizeof(string), "%s ti-a furat din portofel {32CD32}%d${FFFFFF}!", nume1, smoney); SendClientMessage(target, COLOR_WHITE, string); format(string, sizeof(string), "* Ai furat din portofelul lui %s suma de {32CD32}%d${FFFFFF}!", nume2, smoney); SendClientMessage(playerid, COLOR_WHITE, string); StealTimer[playerid] = 1; GivePlayerMoney(playerid, smoney); GivePlayerMoney(victima, -smoney); } else { SendClientMessage(playerid, COLOR_GREY, "Nu e nimeni langa tine!"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, "Nu esti membru Thieves!"); return 1; } return 1; }
PS2: I will give rep. for solution!