Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×

Recommended Posts

Posted
15 hours ago, AbivSA-MP said:

Sistem golf:))/sistem tunning mai complicat gen ca pe b hood si cam atat

o sa fac ala de golf in weekend ul asta cand am timp

 

14 hours ago, bvndit0 said:

le oferi gratis..?

da o sa fac un topic si il postez

Posted (edited)

Poți face o librărie prin care sa îți arate pe textdraw din ce parte primești damage 

Edited by HPQ123
Posted (edited)

Simplu, compari unghiul tau cu unghiul de la player-ul care trimite damage.

 

hook OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
    new Float:playerAngle, Float:attackerAngle;

	//player
    GetPlayerFacingAngle(playerid, playerAngle);
	//attacker
    GetPlayerFacingAngle(issuerid, attackerAngle);

    new Float:angleDifference = playerAngle - attackerAngle;
    if (angleDifference < -180.0 || angleDifference > 180.0)
    {
        SendClientMessage(playerid, -1, "damage from behind");
    }
    else if (angleDifference < -90.0 || angleDifference > 90.0)
    {
        SendClientMessage(playerid, -1, "damge from the side");
    }
    else
    {
        SendClientMessage(playerid, -1, "front damage");
    }

    return 1;
}

Eventual, poti sa mai adaugi si verificare de unde vine dmg-ul, sa iei numele zonei, coordonate, etc, si sa afisezi un mesaj ca te-a lovit un jucator din zona respectiva. Asta e varianta simpla.
 

 

Edited by Costi Oprea
Posted
2 hours ago, Costi Oprea said:

Simplu, compari unghiul tau cu unghiul de la player-ul care trimite damage.

 

hook OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
    new Float:playerAngle, Float:attackerAngle;

	//player
    GetPlayerFacingAngle(playerid, playerAngle);
	//attacker
    GetPlayerFacingAngle(issuerid, attackerAngle);

    new Float:angleDifference = playerAngle - attackerAngle;
    if (angleDifference < -180.0 || angleDifference > 180.0)
    {
        SendClientMessage(playerid, -1, "damage from behind");
    }
    else if (angleDifference < -90.0 || angleDifference > 90.0)
    {
        SendClientMessage(playerid, -1, "damge from the side");
    }
    else
    {
        SendClientMessage(playerid, -1, "front damage");
    }

    return 1;
}

Eventual, poti sa mai adaugi si verificare de unde vine dmg-ul, sa iei numele zonei, coordonate, etc, si sa afisezi un mesaj ca te-a lovit un jucator din zona respectiva. Asta e varianta simpla.
 

 

ai testat macar? 100% n-o sa functioneze cum crezi tu.

Posted (edited)
1 hour ago, Sancky said:

ai testat macar? 100% n-o sa functioneze cum crezi tu.

ai dreptate, nu am testat

Varianta corecta ar fi: 

 

if (angleDifference < -135.0 || angleDifference > 135.0)
    {
        SendClientMessage(playerid, -1, "ai fost lovit din fata");
    }
    else if (angleDifference < -45.0 || angleDifference > 45.0)
    {
    	if (angleDifference < -45.0)
    	{
    		SendClientMessage(playerid, -1, "ai fost lovit din partea dreapta");
    	}
    	if (angleDifference > 45.0)
    	{
    		SendClientMessage(playerid, -1, "ai fost lovit din partea stanga");
    	} 
    }
    else
    {
        SendClientMessage(playerid, -1, "ai fost lovit din spate");
    }

 

Edited by Costi Oprea
Posted
1 minute ago, HPQ123 said:

Mă refeream la ceva de genul 

Screenshot_2023-09-28-15-19-44-558_com.android.chrome-edit.jpg

misto ideea, mai trebuie doar sa adaugi niste textdraw-uri dupa pozitia din care primesti damage

  • 2 weeks later...
Posted
On 9/28/2023 at 7:40 PM, nobilzeus said:

ba coaie ma dau afara din guilda daca nu intru la raiduri pe wow nu am timp smr, vine sistemu de golf e aproape gata 

Sistem-ul de golf mai vine?

Posted
16 hours ago, BistyAdry said:

Sistem-ul de golf mai vine?

daca vrei til dau doar tie pe 10 euro daca esti asa nerabdator

  • Haha 1
Posted
5 minutes ago, nobilzeus said:

daca vrei til dau doar tie pe 10 euro daca esti asa nerabdator

damil mie frt, si til dau pe al meu, fair trade

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.