Jump to content

Tutorial giftbox


Daedric-Fox

Recommended Posts

Descriere tutorial: Bun..deci la dealership cu dialog nu m-am lipti, dar poate sa faca cineva un tutorial cu un filescript giftbox?

**********************************

Servicii Scripting de calitate:

*********************************

Future Project: ExpertGame

*********************************

Link to comment
Share on other sites

nimeni? :))pe bune :)))

stai tu calm,nimeni nu raspunde in a 2-a secunda dupa ce ai postat.

 

In fine,trecand la chestii serioase,

Ma gandesc ca folosesti INI dupa cate am vazut din topicuriile tale.

Si daca nu ma insel, folosesti ZCMD.

Pai,sa incepem.

Undeva pe la Gamemode sau FS pune:

forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);

Acum,

Vom face un nou public.

public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
   new Float:oldposx, Float:oldposy, Float:oldposz;
   new Float:tempposx, Float:tempposy, Float:tempposz;
   GetPlayerPos(playerid, oldposx, oldposy, oldposz);
   tempposx = (oldposx -x);
   tempposy = (oldposy -y);
   tempposz = (oldposz -z);
   if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
   {
   return 1;
   }
   return 0;
}

Cred ca te intrebi de ce sa pui asta,pai,acest public il vei folosi pentru a pune coordonatele in comanda si pentru razele in care va putea playerul sa foloseasca comanda.

Bun,acum o sa facem comanda in sine.

CMD:getgift(playerid, params[])
{
   if(PlayerToPoint(50.0,playerid, X,Y,Z)) // Ma gandesc ca vrei sa fie intr-un loc anume,aceasta functie va va interzice folosirea comenzi intr-o alta zona decat cea pusa de tine.
   //Unde am pus X,Y,Z pui coordonatele tale unde vrei sa fie folosita comanda.
   //Banuiesc ca ai remarcat acel 50.0,ala va reprezenta cat de mare va fi zona in care sa poata folosi comanda.
   PlayerInfo[playerid][pScore] = 4211241; // Acest PlayerInfo(tu poate ai altceva,daca ai altfel modifici cu ce ai tu.) il vei folosi pentru a citi ce vrei sa ii dai.
   //Acest playerid va lua ID-ul jucatorului si ii va da cadoul.
   //Acest pScore si acele numere puse random ii va da jucatorului Scor,tu vei schimba in ce vrei sa ii dai.(bani,etc)
   return 1;
 }
 else
  {
   SendClientMessage(playerid, CULOARE, "Nu esti in locul potrivit pentru a lua cadoul!");
   return 1;
  }
  //Din start sper ca te-ai prins ce face acel else,va trimite un mesaj jucatorului daca nu e in zona pusa de tine pentru a lua giftul.
  return 1;
}

 

Sper ca ai inteles ceva din asta :)

Si sper ca te-a ajutat.

Ofer servicii de web designer/developer(contact me pentru portofoliu etc)

Metode de plata: Paysafecard,Skrill,PayPal,Bitcoin

Ofer si servicii de Penetration Testing.

Vand si VPN-uri. 5 euro pe luna

Skype: live:mrtunne.tkcode

Discord: https://mrtunne.info/discord

Link to comment
Share on other sites

Cu mare placere ;) 

Ofer servicii de web designer/developer(contact me pentru portofoliu etc)

Metode de plata: Paysafecard,Skrill,PayPal,Bitcoin

Ofer si servicii de Penetration Testing.

Vand si VPN-uri. 5 euro pe luna

Skype: live:mrtunne.tkcode

Discord: https://mrtunne.info/discord

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.