18.04.2011, 18:47
He got 100 of what on every second, explain more, I don't understand.
EDIT: I think I 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;
}