Jump to content

Intrare / iesire pe F


Zen TriX

Recommended Posts

 Salut, mai nou am facut un DealerShip  poza mai jos, Ce vreau eu sa fac? 

La intrare adica inafara ds-ului sa fac cand apesi "F" sa te bage inauntru (am toate coordonatele care imi trebuie.

Eu momentan lam facut cu comenzi, la intrare in ds > /opends | si din inauntru sa iesi afara > /exitds sau ceva de genu, dar e prea naspa si de asta vreau sa il fac pe tasta "F" 

ma poate ajuta cineva? 

sa-mp-002.thumb.png.3c931a98fb31c22a3d61a89cd2c9b654.png

Link to comment
Share on other sites

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) {

	if(newkeys == 70 && IsPlayerInRangeOfPoint(playerid,2.0, x,y,z)) /* IsPlayerInRangeOfPoint verifica daca jucatorul se afla in aria data de tine, tu bagi la intrare */
	{
 		SetPlayerPos(playeri, x, y,z); } /* coordonatele unde o sa apara jucatorul daca apasa la intrare F       */             
    return 1; 
}


/* Aceeasi chestie o faci si la iesire */

/* La dorinta poti sa mai bagi si un 3dtext ca sa stie jucatorul pe ce sa apese */

CreateDynamic3DTextLabel("text",-1, x, ,y ,z + 1.3, 7.0,INVALID_PLAYER_ID, INVALID_VEHICLE_ID);

 

Edited by Khain Developer
Link to comment
Share on other sites

Acum 35 minute, Khain Developer a spus:

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) {

	if(newkeys == 70 && IsPlayerInRangeOfPoint(playerid,2.0, x,y,z)) /* IsPlayerInRangeOfPoint verifica daca jucatorul se afla in aria data de tine, tu bagi la intrare */
	{
 		SetPlayerPos(playeri, x, y,z); } /* coordonatele unde o sa apara jucatorul daca apasa la intrare F       */             
    return 1; 
}


/* Aceeasi chestie o faci si la iesire */

/* La dorinta poti sa mai bagi si un 3dtext ca sa stie jucatorul pe ce sa apese */

CreateDynamic3DTextLabel("text",-1, x, ,y ,z + 1.3, 7.0,INVALID_PLAYER_ID, INVALID_VEHICLE_ID);

 

Lam bagat, nicio eroare, dar cand ma duc la locatie si apas F... nu se intampla nimic

 

Link to comment
Share on other sites

Acum 15 minute, Khain Developer a spus:


if(newkeys == 70 schimba cu if(newkeys == KEY_FIRE 

// nu mai tin minte ce identificator are butonul F
                               /* e KEY_FIRE sau KEY_SECONDARY_ATTACK */
                               
                               /* cel mai bine e sa bagi KEY_WALK ( buton alt ) */
                               

 

Ok uite.. asta e comanda in sine

301262814_comandainsine.thumb.png.1d15262122cba18bfeccca8a180d98cf.png

Mai este un public OnPlayerKeyStateChange in care sunt multe lucruri acolo si nu stiu sa il integrez prin el. 

OBS: Nu baga in seama primele 2 errori..am adaug ds ul si tre sa aliniez alea.

Edited by Zen TriX
Link to comment
Share on other sites

Acum 7 minute, Zen TriX a spus:

Ok uite.. asta e comanda in sine

301262814_comandainsine.thumb.png.1d15262122cba18bfeccca8a180d98cf.png

Mai este un public OnPlayerKeyStateChange in care sunt multe lucruri acolo si nu stiu sa il integrez prin el. 

OBS: Nu baga in seama primele 2 errori..am adaug ds ul si tre sa aliniez alea.

In gamemode ai deja OnPlayerKeyStateChange, tu ai mai creeat unu, sterge tot ce ai creeat aici , apasa CTRL + F si cauta OnPlayerKeyStateChange, dupa care bagi in public asta

	if(newkeys == KEY_FIRE && IsPlayerInRangeOfPoint(playerid,2.0, x,y,z)) 
	{
 		SetPlayerPos(playeri, x, y,z); 
	} 

Respectiv cu coordonatele tale

Link to comment
Share on other sites

 

Multumesc, imi merge

Am schimbat KEY_FIRE aia cu 

KEY_SECONDARY_ATTACK

pt ca aia cu KEY FIRE e ctrl si asta e cu F, respect.Daca o sa mai am vreo problema o sa scriu tot pe acest site.

 

 

Edited by Zen TriX
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.