/rob /rape
#3

pawn Code:
CMD:rob(playerid, params[])
{
 new playerb;
 if(!IsPlayerNearPlayer(playerid, playerb, 5)) return SendClientMessage(playerid, COLOR_GREY, "Your Are to far away.");
 if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /rob [playerid]");
 new playersonline;
 foreach(Player, i)
 {
 if(IsPlayerConnected(i)) playersonline++;
 }
 foreach(Player, i)
 {
    if(IsPlayerConnected(i))
    {
    new Rob = (GetPlayerMoney(playerb)/GetPlayerMoney(i));
    GivePlayerMoney(playerid, Rob*playersonline);
    GivePlayerMoney(playerb, -Rob*playersonline);
    }
 }
 return 1;
}
pawn Code:
stock IsPlayerNearPlayer(playerid, targetid, Float:radius)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(targetid, x, y, z);
    if(IsPlayerInRangeOfPoint(playerid, radius ,x, y, z))
    {
        return 1;
    }
    return 0;
}
Reply


Messages In This Thread
/rob /rape - by DerickClark - 04.11.2012, 21:27
Re: /rob /rape - by zDivine - 04.11.2012, 21:32
Re: /rob /rape - by Glad2BeHere - 04.11.2012, 22:08
Re: /rob /rape - by DerickClark - 04.11.2012, 22:11
Re: /rob /rape - by DerickClark - 04.11.2012, 22:13
Re: /rob /rape - by Glad2BeHere - 04.11.2012, 22:14
Re: /rob /rape - by DerickClark - 04.11.2012, 22:20
Re: /rob /rape - by Glad2BeHere - 04.11.2012, 22:21
Re: /rob /rape - by DerickClark - 04.11.2012, 22:24
Re: /rob /rape - by Glad2BeHere - 04.11.2012, 22:27

Forum Jump:


Users browsing this thread: 2 Guest(s)