[FilterScript] [FS] Zones Script
#1

it hasnt that much functions, it just shows the name of the zone you're in. you can integrate this script into game modes and add more functions if you want. you can get it here:

http://mabako.net/samp/0.1/zonesscript/


just load it as filterscript and it is ready for use


update to 0.2: you can now use it with other filterscripts, e.g. with my admin script, just place it in a line like "filterscripts zones admin". thx to littlewhitey for finding this bug out


i made it coz so many ppl. were requesting some script like this
Reply
#2

Good script , may use it
Reply
#3

i accidently put a (dont know where i found these) version online, changed to the correct version now
Reply
#4

very good script thx mabako...
Reply
#5

good one but is it possible to do a "GetPlayerZone" somehow?
Reply
#6

i changed it a bit and now you can use

pawn Code:
public GetPlayerZone(playerid) {
 new line[10];
 format(line,10,"p%dzone",playerid);
 new zoneid = strval(PropertyGet(line));
 return zoneid;
}
(you need dprop, which can be found via search or alternativly here)
Reply
#7

thx alot now i can trace player's locations
Reply
#8

what the function of this script??

i'm dutch
Reply
#9

Yo Very good man, love it
Reply
#10

Quote:
Originally Posted by pdmods
what the function of this script??

i'm dutch
it shows your current zone in the bottom right corner, e.g. "Ganton" or "Idlewood"
Reply
#11

Great job again Mabako
Reply
#12

I don't mean to be picky but how would I change the location names colour?

I've got:

pawn Code:
#define COLOR_GREEN 0x33AA33FF
stuck at the top but can't work out where to stick the:

pawn Code:
COLOR_GREEN,
any help appreciated!!

(I've tried sticking COLOR_GREEN, in a few places already - I aint lazy)
Reply
#13

Quote:
Originally Posted by Sheepeeshaun
I don't mean to be picky but how would I change the location names colour?

I've got:

pawn Code:
#define COLOR_GREEN 0x33AA33FF
stuck at the top but can't work out where to stick the:

pawn Code:
COLOR_GREEN,
any help appreciated!!

(I've tried sticking COLOR_GREEN, in a few places already - I aint lazy)
pawn Code:
{ "~w~Avispa Country Club",     -2470.00, -355.40,   0.00, -2270.00, -318.40,  46.10},
{ "~g~Avispa Country Club",     -2550.00, -355.40,   0.00, -2470.00, -318.40,  39.70},
{ "~r~Back o Beyond",        -1166.90, -2641.10,   0.00, -321.70, -1856.00,  200.00},
{ "~p~Battery Point",        -2741.00, 1268.40,  -4.50, -2533.00, 1490.40,  200.00},
{ "~y~Bayside",           -2741.00, 2175.10,   0.00, -2353.10, 2722.70,  200.00},
{ "~b~Bayside Marina",       -2353.10, 2275.70,   0.00, -2153.10, 2475.70,  200.00},
Just add ~<color letter>~ where you need it to be.
Reply
#14

Quote:
Originally Posted by sXd

pawn Code:
{ "~w~Avispa Country Club",     -2470.00, -355.40,   0.00, -2270.00, -318.40,  46.10},
{ "~g~Avispa Country Club",     -2550.00, -355.40,   0.00, -2470.00, -318.40,  39.70},
{ "~r~Back o Beyond",        -1166.90, -2641.10,   0.00, -321.70, -1856.00,  200.00},
{ "~p~Battery Point",        -2741.00, 1268.40,  -4.50, -2533.00, 1490.40,  200.00},
{ "~y~Bayside",           -2741.00, 2175.10,   0.00, -2353.10, 2722.70,  200.00},
{ "~b~Bayside Marina",       -2353.10, 2275.70,   0.00, -2153.10, 2475.70,  200.00},
Just add ~<color letter>~ where you need it to be.
Thanks for that, just in case anyone else tries this you'll have to change the 27 in this:

pawn Code:
// ZONES
enum zoneinfo {
    zone_name[27],
  Float:zone_minx,
  Float:zone_miny,
  Float:zone_minz,
to 30 for it to compile properly (the ~g~ adds 3 chars to the biggest placename)

As a side note you may want to use pawno's replace feature to put in all the ~<colour>~'s
Reply
#15

can u copy the stuff in .inc file out to the gamemode and use it without #include?
Reply
#16

you actually shouldnt be able to use it with include

(for sheep & sXd) anyway, i suggest you use this

instead of
pawn Code:
if(player_zone_before == -1) GameTextForPlayer(i,zones[j][zone_name],1500,1);
     else if(strcmp(zones[j][zone_name],zones[player_zone_before][zone_name],true) != 0) GameTextForPlayer(i,zones[j][zone_name],1500,1);
;
pawn Code:
new string[30];
format(string,30,"~g~%s",zones[j][zone_name]);
if(player_zone_before == -1) GameTextForPlayer(i,string,1500,1);
     else if(strcmp(zones[j][zone_name],zones[player_zone_before][zone_name],true) != 0) GameTextForPlayer(i,string,1500,1);
;

which is less work and shows the text in green too
Reply
#17

pawn Code:
blah=GetPlayerZone(playerid);
format(huh, sizeof(huh), "Location: %s", blah);
SendClientMessage(playerid, xxxx, huh);
it gives me this
Quote:

Location: &#91;]

maybe not &#91;] but it's a square
------------------------------------------------
screw the ones above
how can i make GetPlayerZone returns the zone name instead of the id?
Reply
#18

hey, this script sounds realy very usefull for tracking where player is. Can i use this script with gamemodes i create and distribute it with them? Giving credit to you of course.
Reply
#19

-_-
again..
but i tried to make 1 myself using existing codes
but i couldn't do it

so, how do you get a player's location name? not id?
Reply
#20

put all the script in your code, and then use

[nobbc]zones&#91;xx&#93;&#91;zone_name&#93;[/nobbc]

to get the zone name of the zone no. xx

@Iain.Gilbert: sure
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)