18.07.2010, 21:25
(
Последний раз редактировалось Marco_Nutz; 19.07.2010 в 03:18.
)
Ai galera, blza?
Eu resolvi fazer um Text Draw que mostra a Localizaзгo aonde o player esta. Bom,To com os nomes das Areas, etc etc.. Bom, mas na hora d compilar, da o seguinte erro:
Peзo que me ajudem, please! ^^
Vou passar o Text Draw que eu criei, uns stock das areas e as zones.
Agradecido desde jб.
Eu resolvi fazer um Text Draw que mostra a Localizaзгo aonde o player esta. Bom,To com os nomes das Areas, etc etc.. Bom, mas na hora d compilar, da o seguinte erro:
Код:
C:\Documents and Settings\Marco Antonio\Meus documentos\The Godfather\gamemode\BWL.pwn(8422) : warning: 202: number of arguments does not match definition
Vou passar o Text Draw que eu criei, uns stock das areas e as zones.
Код:
Text Draw:
LOCALIZACAO = TextDrawCreate(30,326,"Localizacao Atual: %s", ReturnPlayerZone(playerid));// << Linha do ERRO!
TextDrawFont(LOCALIZACAO,2);
TextDrawLetterSize(LOCALIZACAO,30,326);
TextDrawColor(LOCALIZACAO,0xFFFFFFFF);
TextDrawSetShadow(LOCALIZACAO,1);
TextDrawSetOutline(LOCALIZACAO,1);
TextDrawBackgroundColor(LOCALIZACAO,0x000000ff);
TextDrawUseBox(LOCALIZACAO,1);
TextDrawBoxColor(LOCALIZACAO,0x00000050);
Код:
Stock:
stock IsPlayerInZone(playerid, zoneid) {
if(zoneid == -1) return false;
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(x >= zones[zoneid][zone_minx] && x < zones[zoneid][zone_maxx] && y >= zones[zoneid][zone_miny] && y < zones[zoneid][zone_maxy] && z >= zones[zoneid][zone_minz] && z < zones[zoneid][zone_maxz] && z < 900.0) return true;
return false;
}
stock ReturnPlayerZone(playerid)
{
new playerzone[256] = "Desconhecido";
for(new j; j < sizeof(zones); j++) {
if(IsPlayerInZone(playerid,j)) {
memcpy(playerzone, zones[j][zone_name], 0, 108);
break;
}
}
return playerzone;
}
stock GetPlayerZoneID(playerid)
{
for(new j; j < sizeof(zones); j++) {
if(IsPlayerInZone(playerid, j)) return j;
}
}
Код:
Zones: (sao mtas zones, n vo botar todas aqui...
new zones[][zoneinfo] = {
{ "'The Big Ear'", -410.00, 1403.30, -3.00, -137.90, 1681.20, 200.00},
{ "Aldea Malvada", -1372.10, 2498.50, 0.00, -1277.50, 2615.30, 200.00},
{ "Angel Pine", -2324.90, -2584.20, -6.10, -1964.20, -2212.10, 200.00},
{ "Arco del Oeste", -901.10, 2221.80, 0.00, -592.00, 2571.90, 200.00},
{ "Avispa Country Club", -2646.40, -355.40, 0.00, -2270.00, -222.50, 200.00},
{ "Avispa Country Club", -2831.80, -430.20, -6.10, -2646.40, -222.50, 200.00},
{ "Avispa Country Club", -2361.50, -417.10, 0.00, -2270.00, -355.40, 200.00},
{ "Avispa Country Club", -2667.80, -302.10, -28.80, -2646.40, -262.30, 71.10},
{ "Avispa Country Club", -2470.00, -355.40, 0.00, -2270.00, -318.40, 46.10},
{ "Avispa Country Club", -2550.00, -355.40, 0.00, -2470.00, -318.40, 39.70},
{ "Back o Beyond", -1166.90, -2641.10, 0.00, -321.70, -1856.00, 200.00},
{ "Battery Point", -2741.00, 1268.40, -4.50, -2533.00, 1490.40, 200.00},
{ "Bayside", -2741.00, 2175.10, 0.00, -2353.10, 2722.70, 200.00},
{ "Bayside Marina", -2353.10, 2275.70, 0.00, -2153.10, 2475.70, 200.00},
{ "Beacon Hill", -399.60, -1075.50, -1.40, -319.00, -977.50, 198.50},
.
.
.
{ "Flint County", -1213.90, -2892.90, -242.90, 44.60, -768.00, 900.00},
{ "Whetstone", -2997.40, -2892.90, -242.90, -1213.90, -1115.50, 900.00}};


