Random Cash
#2

pawn Код:
new pcash = random(100000);
if(pcash > GetPlayerMoney(target))
{
    pcash = random(100000);
    if(pcash > GetPlayerMoney(target))
    {
    // failed to rob
    }
    else
    {
        GivePlayerMoney(robber,pCash);
        GivePlayerMoney(target,-pCash);
}
else
{
    GivePlayerMoney(robber,pCash);
    GivePlayerMoney(target,-pCash);
}
//Edit: problem fixed
Reply


Messages In This Thread
Random Cash - by Infamous - 22.12.2011, 23:23
Re: Random Cash - by Tigerkiller - 22.12.2011, 23:36
Re: Random Cash - by Infamous - 22.12.2011, 23:37
Re: Random Cash - by Tigerkiller - 22.12.2011, 23:44
Re: Random Cash - by Infamous - 22.12.2011, 23:51
Re: Random Cash - by [ABK]Antonio - 23.12.2011, 00:07
Re: Random Cash - by Infamous - 23.12.2011, 23:31
AW: Re: Random Cash - by Nero_3D - 23.12.2011, 23:48
Re: Random Cash - by Infamous - 24.12.2011, 01:15
Re: Random Cash - by Lorenc_ - 24.12.2011, 01:31

Forum Jump:


Users browsing this thread: 3 Guest(s)