06.08.2010, 22:25
pawn Код:
if(GetPlayerMoney(giveplayerid) > 0) // the victim is defined as giveplayerid
{
new pcash = GetPlayerMoney(giveplayerid); // gets the money of the one who's getting robbed
new robcash = random(pcash); // makes a random amount of the victim's money
GivePlayerMoney(giveplayerid, -robcash); // subtracts the money from the victim
GivePlayerMoney(playerid, robcash); // adds the money to the robber
}

