SA-MP Forums Archive
/robbiz help please - 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: /robbiz help please (/showthread.php?tid=460308)



/robbiz help please - PrinceEpilogue - 28.08.2013

Hello guys i want the cmd /robbiz

For roleplay
So i can rob
[Ammunation-24/7-Clothesshop-Casinos-Bank]

Bank with /robbank


Re: /robbiz help please - coole210 - 28.08.2013

Here I made this.. Whatever it is.

pawn Код:
#include <a_samp>

#define MAX_LOC 3
enum _Locs
{
    BizName[64], Float:MinX, Float:MinY, Float:MaxX, Float:MaxY
}
new Locs[MAX_LOC][_Locs] =
{
    {"Ganton 24/7", 0.0, 0.0, 0.0, 0.0},
    {"West Side Crips 24/7", 0.0, 0.0, 0.0, 0.0},
    {"Wang cars", 0.0, 0.0, 0.0, 0.0}
};

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Robbiz");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/robbiz", cmdtext, true, 7) == 0)
    {
        new Float:Pos[3], bizid = -1;
        GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
        for(new i = 0; i < MAX_LOC; i++)
        {
            if(Pos[0] >= Locs[i][MinX] && Pos[0] <= Locs[i][MaxX] && Pos[1] >= Locs[i][MinY] && Pos[1] <= Locs[i][MaxY])
            {
                bizid = i;
                break;
            }
        }
        if(bizid == -1) return SendClientMessage(playerid, 0xFFFFFFFF, "Not at a business.");
        new rand = random(100000);
        GivePlayerMoney(playerid, rand);
        new Str[128], name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
        format(Str, sizeof(Str), "%s has robbed '%s' and got $%d", name, Locs[bizid][BizName], rand);
        SendClientMessageToAll(0xFFFFFFFF, Str);
        return 1;
    }
    return 0;
}
I'll tell you right now it won't help you unless you actually understand it and work with it.


Re: /robbiz help please - PrinceEpilogue - 28.08.2013

Can you add me on skype or any thing

i dont know how to add it


skype: mido.elprins2