26.07.2015, 19:24
Download streamer and here you go
This will work for players that area only in Cities itself. If you want more contact me.
Credits to Grimrandomer for creating SAMP zone editor
pawn Код:
#include <a_samp>
#include <streamer>
#define MAX_ZONES 3
new zones[MAX_ZONES];
new Float:zones_points_0[] = {
31.0, -568.0, 2991.0, 1692.0
};
new Float:zones_points_1[] = {
-2997.0, 1540.0, -1225.0, 3760.0
};
new Float:zones_points_2[] = {
859.0, 3036.0, 2995.0, 5588.0
};
new zones_text[MAX_ZONES][64] = {
"Los Santos",
"San Fierro",
"las Venturas"
};
public OnFilterScriptInit()
{
zones[0] = CreateDynamicRectangle(zones_points_0[0], zones_points_0[1], zones_points_0[2], zones_points_0[3]);
zones[1] = CreateDynamicRectangle(zones_points_1[0], zones_points_1[1], zones_points_1[2], zones_points_1[3]);
zones[2] = CreateDynamicRectangle(zones_points_2[0], zones_points_2[1], zones_points_2[2], zones_points_2[3]);
return 1;
}
public OnFilterScriptExit() {
return 1;
}
public OnPlayerEnterDynamicArea(playerid, areaid) {
for (new zone=0; zone<MAX_ZONES; zone++) {
if (areaid==zones[zone]) {
new msg[90];
format(msg, 90, "Welcome to %s", zones_text[zone]);
SendClientMessage(playerid, 0xFFFFFFFF, msg);
}
}
return 1;
}
public OnPlayerLeaveDynamicArea(playerid, areaid) {
for (new zone=0; zone<MAX_ZONES; zone++) {
if (areaid==zones[zone]) {
new msg[90];
format(msg, 90, "Goodbye from %s", zones_text[zone]);
SendClientMessage(playerid, 0xFFFFFFFF, msg);
}
}
return 1;
}
Credits to Grimrandomer for creating SAMP zone editor