Hallo,
bei folgendem Script wird nur die erste NODM Zone geladen (am BSN)
new Text:NODM_text;
new nodm[MAX_PLAYERS];
enum NODMv
{
Float:minX,
Float:minY,
Float:maxX,
Float:maxY
};
#define maxNODM 5
new Float:NODM[][NODMv] =
{
{1169.24, -932.76, 1303.46, -851.56},
{732.50, -1330.40, 786.50, -1384.20},
{2139.40, -1124.30, 2114.60, -1160.60},
{2442.80, -1559.70, 2491.90, -1515.10},
{1282.63, -1793.32, 1210.60, -1861.60}
};
public OnPlayerConnect(playerid)
{
nodm[playerid] = 0;
}
public Payday() //läuft sekündlich durch
{
for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
if(GetPlayerNODM(playerid) != -255)
{
if(nodm[playerid] == 0)
{
TextDrawShowForPlayer(playerid, NODM_text);
nodm[playerid] = 1;
}
}
else if(nodm[playerid] == 1)
{
TextDrawHideForPlayer(playerid, NODM_text);
nodm[playerid] = 0;
}
}
}
public OnGameModeInit()
{
NODM_text = TextDrawCreate(485,420,"NO-DM Zone");
TextDrawAlignment(NODM_text,0);
TextDrawBackgroundColor(NODM_text,0xffffffff);
TextDrawFont(NODM_text,1);
TextDrawLetterSize(NODM_text,0.7,2.00000);
TextDrawColor(NODM_text,COLOR_RED);
TextDrawSetOutline(NODM_text,1);
TextDrawSetProportional(NODM_text,1);
TextDrawSetShadow(NODM_text,1);
}
stock GetPlayerNODM(playerid)
{
for(new i=0; i<sizeof(NODM); i++)
{
if(IsPlayerInArea(playerid,NODM[i][minX], NODM[i][maxX], NODM[i][minY], NODM[i][maxY]))
{
return i;
}
}
return -255;
}
Hat jemand eine Idee, woran es liegen könnte?
Danke