SA-MP Forums Archive
/rob command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /rob command (/showthread.php?tid=487957)



/rob command - Laserman - 16.01.2014

guys please give me /rob command and I just edit it.. I am beginner


Re: /rob command - Cannary2048 - 16.01.2014

Try this https://sampforum.blast.hk/showthread.php?tid=234561
pawn Код:
CMD:rob(playerid, params[])
{
    new str[256], id;
    new Float: X, Float: Y, Float: Z;
    id = GetClosestPlayerToPlayer(playerid);
    GetPlayerPos(id, X, Y, Z);
    if(IsPlayerInRangeOfPoint(playerid,2.0,X,Y,Z))
    {
        new Float: money = GetPlayerMoney(id), Float: moneygot[MAX_PLAYERS];
        moneygot[playerid] = money;
        format(str, sizeof(str), "ROB: You robbed %d", moneygot[playerid]);
        SendClientMessage(playerid, 0xFFFFFFFF, str);
    }
    return 1;
}