SetPlayerMapIcon problem -
DaneAMattie - 11.11.2010
Hey i have this code @ OnPlayerConnect
SetPlayerMapIcon(playerid,12,1984.318725,2059.8835 44,10,55,0);
but its not working :S
i also tried these @ OnGamemodeInit:
ShowPlayerMarkers(1);
and
ShowPlayerMarkers(2);
Re: SetPlayerMapIcon problem -
Hiddos - 11.11.2010
Try creating them at OnPlayerSpawn, there are more functions that don't work at specific callbacks.
Re: SetPlayerMapIcon problem -
DaneAMattie - 11.11.2010
Quote:
Originally Posted by Hiddos
Try creating them at OnPlayerSpawn, there are more functions that don't work at specific callbacks.
|
wont it create multiple icons then?
so on each spawn it creates a new one :S
EDIT:
I tried it, its not working though :/
Re: SetPlayerMapIcon problem -
Babul - 11.11.2010
nah, it wont create dozens of icons due to spawning again and again. the icons are numbered, so setting one up again will simply replace the (if) already exsisting icon.
https://sampwiki.blast.hk/wiki/SetPlayerMapIcon
^pay attention to the iconid...
the reason why its not working on OnPlayerConnect(), is simple: theres no interior, nor a virtual world set up for the player, so:
give hiddos' advice a try: place it in the OnPlayerSpawn() callback. this will make the icon permanent.
edit: your line is slightly messed up:
Код:
SetPlayerMapIcon(playerid,12,1984.318725,2059.8835 44,10,55,0);
,playerid == ok i think

,12 == iconid 12? do you already got 12 other icons from 0-11? i assume not, then you should start numbering @ 0.
,1984.318725 == east of the map
,2059.8835 == north
44,10 == ?
,55 == ok your x-y coordinates are at the autobahn shop in lv. then its obvious that you want the car icon.
,0 == color. we dont care here.
after replacing your " 44,10" by ",10.8200" it should look like:
Код:
SetPlayerMapIcon(playerid,12,1984.0000,2059.0000,10.8200,55,0);
conclusion: one space " " can mess up a whole thing hehe i hope this works now.
ah also try that one, starting with the first icon (id 0):
Код:
SetPlayerMapIcon(playerid,0,1984.0000,2059.0000,10.8200,55,0);
Re: SetPlayerMapIcon problem -
DaneAMattie - 11.11.2010
Quote:
Originally Posted by Babul
nah, it wont create dozens of icons due to spawning again and again. the icons are numbered, so setting one up again will simply replace the (if) already exsisting icon.
https://sampwiki.blast.hk/wiki/SetPlayerMapIcon
^pay attention to the iconid...
the reason why its not working on OnPlayerConnect(), is simple: theres no interior, nor a virtual world set up for the player, so:
give hiddos' advice a try: place it in the OnPlayerSpawn() callback. this will make the icon permanent.
|
it still didnt work :/
Re: SetPlayerMapIcon problem -
The_Moddler - 11.11.2010
Quote:
Originally Posted by Hiddos
Try creating them at OnPlayerSpawn, there are more functions that don't work at specific callbacks.
|
It works fine for me under OnPlayerConnect.
Also, the icon gets showed if you are near the icon location, make sure you did check this.
Re: SetPlayerMapIcon problem -
DaneAMattie - 11.11.2010
Quote:
Originally Posted by The_Moddler
It works fine for me under OnPlayerConnect.
Also, the icon gets showed if you are near the icon location, make sure you did check this.
|
yea i know but im shure the icon didnt show up :S, i also did the steps of babul with the icon ID but no succes yet. its a realy weird problem :S
What i also dont get is, why to use a Z ax? its just a map icon :S
Re: SetPlayerMapIcon problem -
The_Moddler - 11.11.2010
Give us the coordinates of the icon and the icon image that you want.
Z is used for the icons that are like player, if the player is above that Z, the icon will be a triangle pointing down.
Re: SetPlayerMapIcon problem -
DaneAMattie - 11.11.2010
Quote:
Originally Posted by The_Moddler
Give us the coordinates of the icon and the icon image that you want.
Z is used for the icons that are like player, if the player is above that Z, the icon will be a triangle pointing down.
|
oke i want this icon:
right here:
Re: SetPlayerMapIcon problem -
The_Moddler - 11.11.2010
Go in game and type /save, then send me the coords