Sziasztok...Elkezdtem egy kis mappot feltntetni a térképen hogy a minimapon meg látszódjon de az istenért se bírok rájönni hogy mért virbál a minimap
#include <a_samp>
new utak0;
new utak1;
new utak2;
new utak3;
new utak4;
new utak5;
new utak6;
new utak7;
new utak8;
new utak9;
new utak10;
new utak11;
new utak12;
new utak13;
public OnGameModeInit()
{
utak0 = GangZoneCreate(1990.689331,543.970153,2179.733886,622.292358);
utak1 =GangZoneCreate(1990.689331,622.292358,2179.733886,543.970153);
utak2 =GangZoneCreate(2428.138183,628.830322,3383.638671,643.089782);
utak3 =GangZoneCreate(3383.427734,561.615783,3396.587890,681.765563);
utak4 =GangZoneCreate(3396.965332,642.491577,3588.149658,628.032958);
utak5 =GangZoneCreate(3587.462158,625.189392,3683.527343,722.644897);
utak6 =GangZoneCreate(3372.494628,688.560363,3355.885986,762.772094);
utak7 =GangZoneCreate(3396.522705,666.003784,3551.104492,680.699890);
utak8 =GangZoneCreate(3551.096191,680.686096,3535.286376,604.612792);
utak9 =GangZoneCreate(2678.671142,735.070922,2694.049072,543.828796);
utak10 =GangZoneCreate(3028.085449,540.962768,2692.623046,575.288146);
utak11 =GangZoneCreate(3027.832763,540.976379,3052.064941,574.771240);
utak12 =GangZoneCreate(3052.406250,563.362304,3133.264404,542.343261);
utak13 =GangZoneCreate(3132.375488,560.412902,3151.361328,292.552551);
return 1;
}
public OnPlayerSpawn(playerid)
{
GangZoneShowForPlayer(playerid, utak0, 0x000000AA);
GangZoneShowForPlayer(playerid, utak1, 0x000000AA);
GangZoneShowForPlayer(playerid, utak2, 0x000000AA);
GangZoneShowForPlayer(playerid, utak3, 0x000000AA);
GangZoneShowForPlayer(playerid, utak4, 0x000000AA);
GangZoneShowForPlayer(playerid, utak5, 0x000000AA);
GangZoneShowForPlayer(playerid, utak6, 0x000000AA);
GangZoneShowForPlayer(playerid, utak7, 0x000000AA);
GangZoneShowForPlayer(playerid, utak8, 0x000000AA);
GangZoneShowForPlayer(playerid, utak9, 0x000000AA);
GangZoneShowForPlayer(playerid, utak10, 0x000000AA);
GangZoneShowForPlayer(playerid, utak11, 0x000000AA);
GangZoneShowForPlayer(playerid, utak12, 0x000000AA);
GangZoneShowForPlayer(playerid, utak13, 0x000000AA);
return 1;
}
/*másolat
utak1 =GangZoneCreate(1990.689331,622.292358,2179.733886,543.970153);
utak2 =GangZoneCreate(2428.138183,628.830322,3383.638671,643.089782);
utak3 =GangZoneCreate(3383.427734,561.615783,3396.587890,681.765563);
utak4 =GangZoneCreate(3396.965332,642.491577,3588.149658,628.032958);
utak5 =GangZoneCreate(3587.462158,625.189392,3683.527343,722.644897);
utak6 =GangZoneCreate(3372.494628,688.560363,3355.885986,762.772094);
utak7 =GangZoneCreate(3396.522705,666.003784,3551.104492,680.699890);
utak8 =GangZoneCreate(3551.096191,680.686096,3535.286376,604.612792);
utak9 =GangZoneCreate(2678.671142,735.070922,2694.049072,543.828796);
//GangZoneCreate(2694.328369,543.827697,3028.300781,555.305541);
//GangZoneCreate(3028.071289,556.749267,2692.308349,575.404968);
//GangZoneCreate(2693.209960,543.830444,3028.108398,556.552856);
utak10 =GangZoneCreate(3028.085449,540.962768,2692.623046,575.288146);
utak11 =GangZoneCreate(3027.832763,540.976379,3052.064941,574.771240);
utak12 =GangZoneCreate(3052.406250,563.362304,3133.264404,542.343261);
utak13 =GangZoneCreate(3132.375488,560.412902,3151.361328,292.552551);
//GangZoneCreate(3071.019287,545.030273,3041.078125,-386.852142);
utak14 =GangZoneCreate(3041.078125,-386.852142,3263.463867,-376.228759);
utak15 =GangZoneCreate(3041.608154,-386.586364,3065.602783,543.659240);
utak16 =GangZoneCreate(3065.133056,274.225158,3300.609375,288.810668);
utak17 =GangZoneCreate(3217.797119,372.608917,3202.119873,177.240921);
utak18 =GangZoneCreate(3317.959716,477.941070,3301.461425,97.416519);
utak19 =GangZoneCreate(3278.157470,98.189537,3322.146484,82.259864);
utak20 =GangZoneCreate(3044.866455,-227.100601,2827.940673,-213.108489);
utak21 =GangZoneCreate(3136.755859,-385.980499,3122.538085,-515.839904);
utak22 =GangZoneCreate(3122.538085,-515.839904,3152.429931,-561.514709);
utak23 =GangZoneCreate(3175.192138,-600.202331,3150.631103,-517.955810);
utak24 =GangZoneCreate(3152.740966,-602.713867,3159.426269,-594.204833);
utak25 =GangZoneCreate(3151.088378,-601.817504,3179.096435,-1177.609008);*/
Ezzel az editorral csinálgatom:
//-----------------------IntrozeN---------------------
//-----------------------Gangzone---------------------
//-----------------------Creator----------------------
//-----------------------v1.0-------------------------
#include <a_samp>
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == \'\\0\') && (dcmd_%1(playerid, \"\"))) || (((%3)[(%2) + 1] == \' \') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#define COLOR_GREENLIGHT 0x9ACD32AA
#define COLOR_DARKRED 0xC10B07FF
forward Createzone(playerid,color);
new Makingzone[MAX_PLAYERS];
new Float:ZMinX;
new Float:ZMaxX;
new Float:ZMinY;
new Float:ZMaxY;
new GangZone;
new Create;
public OnFilterScriptInit()
{
print(\"\\n----------------------------------\");
print(\"Gangzone Creator v1.0 by IntrozeN\");
print(\"----------------------------------\\n\");
if(!fexist(\"/savedzones.txt\")) fopen(\"/savedzones.txt\", io_readwrite);
return 1;
}
public OnFilterScriptExit()
{
GangZoneHideForAll(GangZone);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(zone,4,cmdtext);
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 0)
{
if(response)
{
if(listitem == 0)
{
if(Makingzone[playerid] == 1) return SendClientMessage(playerid,COLOR_DARKRED,\".: Info: You\'re already making a zone. Cancel or Save the current one first :.\");
ShowPlayerDialog(playerid,1,2,\"Color\",\"Blue\\nRed\\nGreen\\nPurple\\nYellow\\nGrey\\nLightblue\\nWhite\\nBlack\",\"Select\",\"Cancel\");
Makingzone[playerid] = 1;
}
if(listitem == 1)
{
if(Makingzone[playerid] == 0) return SendClientMessage(playerid,COLOR_DARKRED,\".: Info: You\'re not making a zone. Create one first :.\");
new string[128];
KillTimer(Create);
format(string,sizeof(string),\"GangZoneCreate(%f,%f,%f,%f);\\r\\n\",ZMinX,ZMinY,ZMaxX,ZMaxY);
new File:save = fopen(\"/savedzones.txt\", io_append);
fwrite(save, string);
fclose(save);
SendClientMessage(playerid,COLOR_GREENLIGHT,\".: Info: Zone created and saved in savedzones.txt :.\");
Makingzone[playerid] = 0;
}
if(listitem == 2)
{
if(Makingzone[playerid] == 0) return SendClientMessage(playerid,COLOR_DARKRED,\".: Info: You\'re not making a zone. Create one first :.\");
KillTimer(Create);
GangZoneDestroy(GangZone);
SendClientMessage(playerid,COLOR_GREENLIGHT,\".: Info: Zone creation cancelled :.\");
Makingzone[playerid] = 0;
}
}
}
if(dialogid == 1)
{
if(response)
{
if(listitem == 0)
{
new Float:Z;
new color;
GetPlayerPos(playerid,ZMinX,ZMinY,Z);
color = 0x0000FFAA;
GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
GangZoneShowForPlayer(playerid,GangZone,color);
Create = SetTimerEx(\"Createzone\",100,1,\"ud\",playerid,color);
}
if(listitem == 1)
{
new Float:Z;
new color;
GetPlayerPos(playerid,ZMinX,ZMinY,Z);
color = 0xFF0000AA;
GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
GangZoneShowForPlayer(playerid,GangZone,color);
Create = SetTimerEx(\"Createzone\",100,1,\"ud\",playerid,color);
}
if(listitem == 2)
{
new Float:Z;
new color;
GetPlayerPos(playerid,ZMinX,ZMinY,Z);
color = 0x00FF00AA;
GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
GangZoneShowForPlayer(playerid,GangZone,color);
Create = SetTimerEx(\"Createzone\",100,1,\"ud\",playerid,color);
}
if(listitem == 3)
{
new Float:Z;
new color;
GetPlayerPos(playerid,ZMinX,ZMinY,Z);
color = 0xFF00FFAA;
GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
GangZoneShowForPlayer(playerid,GangZone,color);
Create = SetTimerEx(\"Createzone\",100,1,\"ud\",playerid,color);
}
if(listitem == 4)
{
new Float:Z;
new color;
GetPlayerPos(playerid,ZMinX,ZMinY,Z);
color = 0xFFFF00AA;
GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
GangZoneShowForPlayer(playerid,GangZone,color);
Create = SetTimerEx(\"Createzone\",100,1,\"ud\",playerid,color);
}
if(listitem == 5)
{
new Float:Z;
new color;
GetPlayerPos(playerid,ZMinX,ZMinY,Z);
color = 0x888888AA;
GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
GangZoneShowForPlayer(playerid,GangZone,color);
Create = SetTimerEx(\"Createzone\",100,1,\"ud\",playerid,color);
}
if(listitem == 6)
{
new Float:Z;
new color;
GetPlayerPos(playerid,ZMinX,ZMinY,Z);
color = 0x00FFFFAA;
GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
GangZoneShowForPlayer(playerid,GangZone,color);
Create = SetTimerEx(\"Createzone\",100,1,\"ud\",playerid,color);
}
if(listitem == 7)
{
new Float:Z;
new color;
GetPlayerPos(playerid,ZMinX,ZMinY,Z);
color = 0xFFFFFFAA;
GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
GangZoneShowForPlayer(playerid,GangZone,color);
Create = SetTimerEx(\"Createzone\",100,1,\"ud\",playerid,color);
}
if(listitem ==
{
new Float:Z;
new color;
GetPlayerPos(playerid,ZMinX,ZMinY,Z);
color = 0x000000AA;
GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
GangZoneShowForPlayer(playerid,GangZone,color);
Create = SetTimerEx(\"Createzone\",100,1,\"ud\",playerid,color);
}
SendClientMessage(playerid,COLOR_GREENLIGHT,\".: Info: Zone is being created :.\");
SendClientMessage(playerid,COLOR_GREENLIGHT,\".: Info: Check on the minimap while moving to create your zone perfectly then save the zone by typing /zone :.\");
}
else if(!response)
{
Makingzone[playerid] = 0;
}
}
return 1;
}
public Createzone(playerid,color)
{
GangZoneHideForPlayer(playerid,GangZone);
GangZoneDestroy(GangZone);
new Float:Z;
GetPlayerPos(playerid,ZMaxX,ZMaxY,Z);
GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
GangZoneShowForPlayer(playerid,GangZone,color);
return 1;
}
dcmd_zone(playerid,params[])
{
#pragma unused params
ShowPlayerDialog(playerid,0,2,\"Gangzone Creator v1.0 by IntrozeN\",\"Createzone\\nSavezone\\nCancelzone\",\"Select\",\"Cancel\");
return 1;
}
Mit rontok el vagy mi a probléma?