Jump to content

Cum adaugi icon pe harta


heker

Recommended Posts

Am observat ca la topicul "Probleme Godfather" sunt multe intrebari cum adaugi icon pe harta.

Nu este greu si m-am gandit sa fac un tutorial

1.Cauti in gm linia:

public OnPlayerConnect(playerid)

si dupa { adaugi

SetPlayerMapIcon( playerid, 1, coordonateX,coordonateY,coordonateZ,id icon, 0 );// icon car

Pentru a vedea id cu iconurile intrati aici:

http://wiki.sa-mp.com/wiki/MapIcons

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...
  • 3 weeks later...

merge dar asa"

SetPlayerMapIcon( playerid, 1, coordonateX,coordonateY,coordonateZ,id icon, 0 );// icon 1
SetPlayerMapIcon( playerid, 2, coordonateX,coordonateY,coordonateZ,id icon, 0 );// icon 2
SetPlayerMapIcon( playerid, 3, coordonateX,coordonateY,coordonateZ,id icon, 0 );// icon 3

observa diferenta

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...
  • 8 months later...
  • 6 years later...
Acum 15 ore, G.Marian a spus:

Spuneți-mi vă rog ce înseamnă


SetPlayerMapIcon( playerid, 1, coordonateX,coordonateY,coordonateZ,id icon, 0 );// icon car

Unde e playerid, 1 - Acel numar (1) este numărul skin-ului din joc?, doar cei ce au skin-ul numărul 1 pot vedea iconița pe mini hartă?

Nu. Este id-ul mapiconului. Poti avea de la 0-99 de map icons. Deci practic e ca si cum ai face asta:

new timer;
timer = SetTimer(...);

Acea variabila timer este id-ul timerului , asemanator acel 1 este id-ul map icon. (Atentie daca nu ai grija si pui acelasi id dar icon diferit se va suprascrie)

https://github.com/samp-incognito/samp-streamer-plugin/wiki/Natives-(Map-Icons)

Eu as folosi CreateDynamicMapIcon si sa stochez intr-o variabila (se poate folosi si per player) si in cazul in care este un icon pe care vrei sa il aibe toata lumea, metoda de mai sus este inutila

Edited by Banditul
Link to comment
Share on other sites

Mulțumesc pentru răspuns.

Eu vreau să fac map icon pentru toată lumea, te rog să îmi dai un exemplu cu id-ul 10 (Adică id-ul de la Burger Shot) cu acest cod (Inclusiv cu coordonate).

  • CreateDynamicMapIcon(Float:x, Float:y, Float:z, type, color, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_MAP_ICON_SD, style = MAPICON_LOCAL, areaid = -1, priority = 0)
  • DestroyDynamicMapIcon(iconid)
  • IsValidDynamicMapIcon(iconid)
Edited by G.Marian
Link to comment
Share on other sites

CreateDynamicMapIcon(x, y, z, 10, 0);

Asta va crea un map icon la coordonatele respective(nu cunosc locatia burger shot deci nu iti pot oferi si coordonatele) cu icon pentru burger shot disponibil pentru toti jucatorii  toate interioarele si toate lumile(worlds)

CreateDynamicMapIcon(x, y, z, 10, 0, .interiorid = 0);

Si daca vrei sa fie vazut numa in interior 0 pui cum am pus mai sus (e valabil si pentru ceilalti paramerii) , de ce am pus punct? Ca sa accesez explicit acel parametru si sa nu dau valori pentru toti

Si daca vrei sa zicem ca vrei sa o stergi

new burgerShotIcon;

burgerShotIcon = CreateDynamicMapIcon(x, y, z, 10, 0);

DestroyDynamicMapIcon(burgerShotIcon):

 

  • Thanks 1
Link to comment
Share on other sites

Acum 8 minute, G.Marian a spus:

Și dacă mai vreau să fac unul tot pentru Burger Shot ce trebuie sa schimb la primul (Adică următorul cod sub el).


CreateDynamicMapIcon(x, y, z, 10, 0, .interiorid = 0);

Coordonatele(pozitia) . Nimic altceva (in cazul in care vrei sa aibe aceiasi parametrii)

Si eventual variabila daca o sa stergi map icon

Edited by Banditul
  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.