CreateDynamicMapIcon problem
#1

i just cannot seem to add mapicons properly

i've tried under OnGameModeInit

first

Код:
new MapIcons[5];

    
MapIcons[0] = CreateDynamicMapIcon(1058.1749,-1021.3140,41.4997, 27, 0, -1, -1, -1, 300.0, MAPICON_LOCAL); // LS Trans
MapIcons[1] = CreateDynamicMapIcon(-2715.9492,218.3143,4.3496, 27, 0, -1, -1, -1, 300.0, MAPICON_LOCAL); // SF Wheel Arch
MapIcons[2] = CreateDynamicMapIcon(-1936.7491,248.1994,34.1704, 27, 0, -1, -1, -1, 300.0, MAPICON_LOCAL); // SF Trans
MapIcons[3] = CreateDynamicMapIcon(2388.0276,1050.3286,10.5547, 27, 0, -1, -1, -1, 300.0, MAPICON_LOCAL); // LV Trans
MapIcons[4] = CreateDynamicMapIcon(2644.6340,-2038.8019,13.5500, 27, 0, -1, -1, -1, 300.0, MAPICON_LOCAL); // LS Loco Low Co
but i got compile errors, so i tried

Код:
new MapIcons[5];

    
MapIcons[0] = CreateDynamicMapIcon(1058.1749,-1021.3140,41.4997, 27, 0, -1, -1, -1, 300.0); // LS Trans
MapIcons[1] = CreateDynamicMapIcon(-2715.9492,218.3143,4.3496, 27, 0, -1, -1, -1, 300.0); // SF Wheel Arch
MapIcons[2] = CreateDynamicMapIcon(-1936.7491,248.1994,34.1704, 27, 0, -1, -1, -1, 300.0); // SF Trans
MapIcons[3] = CreateDynamicMapIcon(2388.0276,1050.3286,10.5547, 27, 0, -1, -1, -1, 300.0); // LV Trans
MapIcons[4] = CreateDynamicMapIcon(2644.6340,-2038.8019,13.5500, 27, 0, -1, -1, -1, 300.0); // LS Loco Low Co
it compiles perfectly but then i run the samp-server.exe and it says in the console
" CreateDynamicMapIcon: Expecting 10 Parameter(s), but found 9 "



and then ingame, the map icons don't show up :/.

i opened streamer.inc with pawno and went to this line

Код:
native CreateDynamicMapIcon(Float:x, Float:y, Float:z, type, color, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0);
and i turned it into this (not sure where i got the idea from)

Код:
native CreateDynamicMapIcon(Float:x, Float:y, Float:z, type, color, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0, style = MAPICON_LOCAL);
after this, i was able to compile my script and run it, it was working perfectly.

but why did i have to add an extra parameter to streamer.inc for this to even work? why does it expect 10 parameters yet it only has 9 parameters in the default native inside streamer.inc?

is there another way of adding a map icon? besides SetPlayerMapIcon


i can assure you i have the latest streamer files.

also i may have posted this in the wrong section, sorry
Reply
#2

I think your streamer.dll was more recent/older than your streamer.inc. So the value parameters are not the same
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)