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.