Pickup when kill a medic?
#1

Hi all,in my gm i use gTeam and i've medics team:

TEAM_MEDICS

I need to do,if a player kill a medic,a pickup of 15% health will be dropped when the medic dies.

I know i need to work on OnPlayerDeath,but how?

Thanks
Reply
#2

At onPlayerDeath Create a pickup and at Onplayerpickup make it to give to the player 15% of 100?
Reply
#3

Yeah i know that but,i need to drop the pickup ONLY when u kill a MEDIC.
Reply
#4

If you at least try to script it I will help you, but your requests for scripting help are all kind of "can you script this for me" rather than "can you tell me why this isn't working"
Reply
#5

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
Yeah i know that but,i need to drop the pickup ONLY when u kill a MEDIC.
You can use something like killerid or getteam, i dont know it takes me a hour to script it and now i dont have time, sorry but you understand me right? You can add something like
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new Float:Health;
    GetPlayerHealth(victimid, Health);
    new Float:x,Float:y,Float:z;
    GetPlayerPos(victimid, x, y, z);
    if(Health == 0.0)
    {
         if(gClass[playerid] = you medic class)
          {
          medpickup = createpickup(blahblahblah)
          }
      }
      return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if (pickupid == medpickup)
    {
    Setplayerhealth(blahblahblah)
    return 1;
    }
}
i dont know if it works, but if not you can figure it out, i made all the whole code to you xD
Reply
#6

Quote:
Originally Posted by Rachael
Посмотреть сообщение
If you at least try to script it I will help you, but your requests for scripting help are all kind of "can you script this for me" rather than "can you tell me why this isn't working"
If the world will run as like u think,no one will help others.

And btw,i can script for myself,i just post code when i REALLY need help (ex: functions dont working or other).

@matute,thanks.
Reply
#7

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
If the world will run as like u think,no one will help others.

And btw,i can script for myself,i just post code when i REALLY need help (ex: functions dont working or other).

@matute,thanks.
sometimes its hard to post your code because you think anyone will steal your code, thats why some people dont post them and i understand, its hard for me too
Reply
#8

Yeah,but i dont care if someone steal my code.I give you an example:

Look at this COD servers,they've all same gm,and guess what?Only original servers has much players,the others copy has less 10-20 at day.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)