Jump to content
  • 0

Anti-dm intr-o locatie selectata.


Rony

Question

Nick: Rony

Problema(intrebare/ajutor): Cum as putea sa pun ca intr-o locatie aleasa de mine( /aa , ex) sa nu se poata face dm? Sa primesti disarm mereu cand faci dm in locatia respectiva.. (optional,daca merge: /god 30 secunde, cand se teleporteaza acolo)

Erori / warnings:  -

Lini/script:-

Ai incercat sa rezolvi singur ?: N-am idei nici cum sa incep..

Respect Khalifa ?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Gata.. am rezolvat.. Multumesc :)

[Pentru cei care vor sa stie cum..] :

[pawn]

public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)

{

    if(IsPlayerInRangeOfPoint(playerid, 20, 404.9024, 2462.8943, 16.5000)) // playerid - pentru playerul respectiv,care se afla in raza aia (de coordonate..) ,  20 - numarul de metrii, doar pe raza a 20 metrii, sunt valabile comenzile de mai jos..  si dupa coordonatele X Y Z. (numerele mai lungi)

  { // asta deschide pentru "IfPlayersInRangeOfPoint"..  toate comenzile de mai jos, o sa mearga doar pentru IsPlayerInRangeOfPoint (adica, in raza a 20 metrii)

    SetPlayerHealth(playerid, 0);//  Seteaza celui care da damage, 0 viata.. (adica,kill.. il omoara)

    SetPlayerHealth(damagedid, 100); //optional: sa ii seteze celui ce primeste damage-ul, 100 la viata..

    SendClientMessage(playerid, Green, "[iNFO] : You can't spawn kill!"); // Aici ii trimite un mesaj celui care da damage..

  }  //  asta inchide pentru "IfPlayersInRangeOfPoint".. comenzile ce urmeaza mai jos de asta..nu mai sunt valabile pentru IsPlayerInRangeOfPoint..[/pawn]

Si..mai am o varianta.. mai simpla(cred)..

[pawn]

public OnPlayerDeath(playerid, killerid, reason)

{

    SendDeathMessage(killerid, playerid, reason);

    //

    if(IsPlayerInRangeOfPoint(killerid, 20, 404.9024, 2462.8943, 16.5000)) // la fel ca sus..faza cu raza

  {

    SetPlayerHealth(killerid, 0); // Aici e altfel..Deabea dupa ce omoara un player aflat in raza aia..moare atacatorul.

    SendClientMessage(killerid, Green, "[iNFO] : You can't spawn kill!"); //  Mesajul ce il primeste cel ce l-a omorat.

  }

//

[/pawn]

Se poate inchide :D

Respect Khalifa ?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.