bag of money after the murder
#1

How to do when you kill someone, then place it appears the money that you can take!? Id a bag of money 1550


Sorry do not speak English, wrote a translator
Reply
#2

You can add this to the time when he gets killed.

money = CreatePickup(1550, 2, 3376.18, -2856.38, 104.94);

And you can add this OnPlayerPickupPickup

GivePlayerMoney(playerid,1550);
DestroyPickup(money);
return 1;



PS Not tested, im not sure.
Reply
#3

Please correct code lavonama and experienced scripters, if not right!
Reply
#4

And when you take this bag you give money to the murdered?
Reply
#5

Do it like this:

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(killerid, x, y, z)
    money = CreatePickup(1550, 2, x,y,z);
    SendClientMessage(playerid, "Money bag spawned");
    return 1;
}


And you can add this OnPlayerPickupPickup

GivePlayerMoney(playerid,1550);
DestroyPickup(money);
return 1;
Reply
#6

Quote:
Originally Posted by Wesley221
Посмотреть сообщение
Do it like this:

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(killerid, x, y, z)
    money = CreatePickup(1550, 2, x,y,z);
    SendClientMessage(playerid, "Money bag spawned");
    return 1;
}


And you can add this OnPlayerPickupPickup

GivePlayerMoney(playerid,1550);
DestroyPickup(money);
return 1;
If the killer uses a sniper then it would spawn near him. Use GetPlayerPos(playerid, X, Y, Z); instead.
Reply
#7

Thanks all
Reply
#8

I have an error, make a simple but complete script! with all new please
Reply
#9

What about you show the errors + code

Edit:

Quote:
Originally Posted by XFlawless
Посмотреть сообщение
If the killer uses a sniper then it would spawn near him. Use GetPlayerPos(playerid, X, Y, Z); instead.
Well, if you want to make it realistic, its better to spawn it near the killer. Example, if you kill someone IRL with a sniper, the cash isnt dropped right infront of you right? So its more realistic just to drop it at the killerid's place
Reply
#10

Please do me a FS!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)