Show city under the map
#1

Hello,

I need a script to show the city under the map. Nicest is the road and city (like Beach).
Can you telle me how to do this?

I know the function EnableZoneNames(1);, but how to place the zone under the mini-map?

Thanks.
Reply
#2

I didn't understand what you want exactly.

Mind elaborating?
Reply
#3

Just map it under. Using MTA
Reply
#4

Do you mean displaying city names underneath the radar?
Reply
#5

I have made a example what i want. Made in paint.



And iTorran, yes. My English is very bad. Sorry.
Reply
#6

You can use a script by RealCop228.

@RealCop: I edited it a bit in case he doesn't have the includes.

pawn Код:
#include <a_samp>
#include <a_zones>

#define UPDATE_GPS (5) // Updates the GPS each (bla) seconds. Default: 5.

new
    Text:GPSTD[MAX_PLAYERS],
    timer;

public OnFilterScriptInit()
{
    print("OFSI called");
    foreach(Player, i)
    {
        GPSTD[i] = TextDrawCreate(530.000000, 434.000000, " ");
        TextDrawBackgroundColor(GPSTD[i], 80);
        TextDrawFont(GPSTD[i], 3);
        TextDrawLetterSize(GPSTD[i], 0.179999, 0.799999);
        TextDrawColor(GPSTD[i], -1);
        TextDrawSetOutline(GPSTD[i], 1);
        TextDrawSetProportional(GPSTD[i], 1);
    }
    timer = SetTimer("UpdateGPS", (UPDATE_GPS * 1000), 1);
    return 1;
}

public OnFilterScriptExit()
{
    print("OFSE called");
    foreach(Player, i) TextDrawHideForAll(GPSTD[i]);
    KillTimer(timer);
    return 1;
}

forward UpdateGPS();
public UpdateGPS()
{
    print("UGPS timer called");
    for(new i=0; i<MAX_PLAYERS; ++i) if(IsPlayerConnected(i))
    {
        new szZone[MAX_ZONE_NAME];
        GetPlayer2DZone(i, szZone, MAX_ZONE_NAME);
        TextDrawSetString(GPSTD[i], szZone);
    }
}

public OnPlayerConnect(playerid)
{
    print("OPC called");
    GPSTD[playerid] = TextDrawCreate(530.000000, 434.000000, " ");
    TextDrawBackgroundColor(GPSTD[playerid], 80);
    TextDrawFont(GPSTD[playerid], 3);
    TextDrawLetterSize(GPSTD[playerid], 0.179999, 0.799999);
    TextDrawColor(GPSTD[playerid], -1);
    TextDrawSetOutline(GPSTD[playerid], 1);
    TextDrawSetProportional(GPSTD[playerid], 1);
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    print("OPDC called");
    return 1;
}

public OnPlayerSpawn(playerid)
{
    print("OPS called");
    TextDrawShowForPlayer(playerid, GPSTD[playerid]);
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    print("OPD called");
    TextDrawHideForPlayer(playerid, GPSTD[playerid]);
    return 1;
}
Reply
#7

Where must i place this?
Reply
#8

Make a new filterscript and paste this in. Then add it on the "filterscripts" line in server.cfg.
Reply
#9

Thanks for your help. I will try it.
Reply
#10

C:\Users\Rick\Desktop\freemode\filterscripts\city. pwn(2) : fatal error 100: cannot read from file: "a_zones"

This is what i get by compiling this. Help?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)