How i can do this???
#1

I want to make a money bag when player find a money bag he got 100 on every second and on player kill the money bag drop and other pic and got 100 on every sec ?? plz help its to samll plz help
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=187229
Reply
#3

Plz help how i make this
Reply
#4

just create a pickup like a briefcase or whatever you want then OnPlayerEnterPickUp just give the player the money GiveMoney...
Reply
#5

no read carefully and then
Reply
#6

He got 100 of what on every second, explain more, I don't understand.

EDIT: I think I understand:

pawn Код:
new pickup, timer;

public OnGameModeInit( )
{
    pickup = CreatePickup( 1550, 19, Float:X, Float:Y, Float:Z, 0 ) // change where you want the moneybag to be at beginning.
    return 1;
}

public OnPlayerPickUpPickup( playerid, pickupid )
{
    if( pickupid == pickup )
    {
        timer = SetTimerEx( "CashTimer", 1000, 1, "i", playerid );
        SetPVarInt( playerid, "HasBag", 1 );
    }
    return 1;
}

public OnPlayerDeath( playerid, killerid, reason )
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos( playerid, x, y, z );
    if( GetPVarInt( playerid, "HasBag" ) == 1 )
    {
        DestroyPickup( pickup );
        pickup = CreatePickup( 1550, 19, x, y + 3, z, 1 );
        SetPVarInt( playerid, "HasBag", 0 );
        KillTimer( timer );
    }
    return 1;
}

forward CashTimer( playerid )
{
    GivePlayerMoney( playerid, 100 );
    return 1;
}
Reply
#7

Quote:
Originally Posted by Mean
Посмотреть сообщение
He got 100 of what on every second, explain more, I don't understand.
1OO buck's a second.
Reply
#8

no 100$ on every time
Reply
#9

Quote:
Originally Posted by Bilawal2050
Посмотреть сообщение
no 100$ on every time
Just a heads up:

$100 = 100 buck's.
Reply
#10

I understand what Bilawal want, he wanted a Bag [like SWAT4]... that if you OnPlayerEnterPickup, it GivePlayerMoney(playerid, 100); every 1 sec, after this... only who get it, it stays in the actor who Enter it..

And if player Dead, the pickup[Money BAG] fall from player, other player can got it!!!
Reply
#11

Quote:
Originally Posted by Stigg
Посмотреть сообщение
Just a heads up:

$100 = 100 buck's.
Your post wasn't needed.

pawn Код:
new HasMoneyBag[MAX_PLAYERS];
new MONEYBAG;

public OnGameModeInit()
{
    MONEYBAG = CreatePickup(1550, 23, 0.0, 0.0, 0.0);
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == MONEYBAG)
    {
        HasMoneyBag[playerid] = 1;
        DestroyPickup(MONEYBAG);
        GivePlayerMoney(playerid, 100);
    }
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    if(HasMoneyBag[playerid])
    {
        new Float:x, Float:y, Float:z;
        GetPlayerPos(playerid, x, y, z);
        HasMoneyBag[playerid] = 0;
        MONEYBAG = CreatePickup(1550, 2, x + 1.0, y - 1.0, z);
    }
    return 1;
}
Was that hard?
Reply
#12

Quote:
Originally Posted by 69Playa
Посмотреть сообщение
Your post wasn't needed.
Why was'nt it needed ? I was replying Bilawal2050.
I think you meant your post was'nt needed, so keep your kneb out.
Reply
#13

Quote:
Originally Posted by Stigg
Посмотреть сообщение
Why was'nt it needed ? I was replying Bilawal2050.
I think you meant your post was'nt needed, so keep your kneb out.
My post wasn't needed? Negative comments get you know where, but drags you closer to receiving an infraction. I was just helping him, providing code (whilst you were posting something useless!) so there's no need to go off-topic here and post negative comments towards a guy who's trying to help a fella who needs something.
Reply
#14

Quote:
Originally Posted by 69Playa
Посмотреть сообщение
My post wasn't needed? Negative comments get you know where, but drags you closer to receiving an infraction. I was just helping him, providing code (whilst you were posting something useless!) so there's no need to go off-topic here and post negative comments towards a guy who's trying to help a fella who needs something.
You edited out the knaff comment about the user to learning to script from your post.
I'm not getting into a argument about it, just practice what you preach.
Reply
#15

Quote:
Originally Posted by Stigg
Посмотреть сообщение
You edited out the knaff comment about the user to learning to script from your post.
I'm not getting into a argument about it, just practice what you preach.
You're right, however, I was being harsh to the guy and he needed help so I just took it out of my post.

I'm out of this thread, too much unnecessary off-topic garbage here, and it's starting to form into a fucking war.
Reply
#16

I already posted the code, so it is pretty useless 69Playa.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)