Jump to content

Comanda [/fly] dezactivated on F! Help me!


PigSmo

Recommended Posts

Salut, eu pot spune ca am inceput sa scriptez de acum o luna si tot incerc sa avansez, sa creez ceva nou dar nu reusesc! Ceea ce vreau sa creez este sa fac sistemul de fly pentru admini mai imbunatatit de cel pe care il am. Nu-mi place la sistemul pe care il am ca daca merg putin cu fly atingand soseaua primesc damage si mor, iar as mai dorii sa pot apasa tasta F si sa se dezactiveze. Eu am incercat dar nu imi iese deoarece sunt incepator. Daca ma puteti ajuta va sunt recunoscator.

Link to comment
Share on other sites

3 hours ago, PigSmo said:

Salut, eu pot spune ca am inceput sa scriptez de acum o luna si tot incerc sa avansez, sa creez ceva nou dar nu reusesc! Ceea ce vreau sa creez este sa fac sistemul de fly pentru admini mai imbunatatit de cel pe care il am. Nu-mi place la sistemul pe care il am ca daca merg putin cu fly atingand soseaua primesc damage si mor, iar as mai dorii sa pot apasa tasta F si sa se dezactiveze. Eu am incercat dar nu imi iese deoarece sunt incepator. Daca ma puteti ajuta va sunt recunoscator.

Pentru problema cu damage-ul, vei pune la comanda /fly sau /flymode cum ai tu:

SetPlayerHealth(playerid, 9999);

Iar pentru oprirea cu tasta "F", te duci la callback-ul OnPlayerKeyStateChange, si faci o verificare:

if(newkeys & KEY_SECONDARY_ATTACK)
{
	//Functia De oprire StopFly(playerid); daca nu ma insel;
}

 

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

Servicii Scripting de calitate:

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

Future Project: ExpertGame

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

Link to comment
Share on other sites

9 minutes ago, Daedric-Fox said:

Pentru problema cu damage-ul, vei pune la comanda /fly sau /flymode cum ai tu:


SetPlayerHealth(playerid, 9999);

Iar pentru oprirea cu tasta "F", te duci la callback-ul OnPlayerKeyStateChange, si faci o verificare:


if(newkeys & KEY_SECONDARY_ATTACK)
{
	//Functia De oprire StopFly(playerid); daca nu ma insel;
}

 

if(newkeys & KEY_SECONDARY_ATTACK)
{
	//Functia De oprire StopFly(playerid); daca nu ma insel;
    SetPlayerHealth(playerid, 100);
}

 

Retras

Link to comment
Share on other sites

2 hours ago, PigSmo said:

Cum adica "//Functia de oprire StopFly ..." vreau sa inteleg :) cu cat inteleg devin si eu mai bun!

Ehh, era greu sa iti spuna "apelam functia StopFly".

adica:

if(newkeys & KEY_SECONDARY_ATTACK)
{
	StopFly(playerid);
    SetPlayerHealth(playerid, 100);
}

 

Retras

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.