11.04.2012, 16:57
Hi,
I try to write a macro which does the same with OnPlayerPickupPickUp as for OnPlayerCommandText in zcmd and Co.
I have an enum for all type of pickups (e.g. PICKUPTYPE_HOUSE, PICKUPTYPE_HOTEL, PICKUPTYPE_GASSTATION, ...).
In OnPlayerPickupPickUp I want to call the pickup type function with CallLocalFunction. I'm using "PickupEvent_%d" as the function name (%d = value of PICKUPTYPE_..., e.g. 2 will be "PickupEvent_2").
That was the easy part. But how can I write the macro which contains the forward and public for the pickup type function?
I want to define my pickup type function in this way:
And that should be translated to that:
Any way to make that working?
I try to write a macro which does the same with OnPlayerPickupPickUp as for OnPlayerCommandText in zcmd and Co.
I have an enum for all type of pickups (e.g. PICKUPTYPE_HOUSE, PICKUPTYPE_HOTEL, PICKUPTYPE_GASSTATION, ...).
In OnPlayerPickupPickUp I want to call the pickup type function with CallLocalFunction. I'm using "PickupEvent_%d" as the function name (%d = value of PICKUPTYPE_..., e.g. 2 will be "PickupEvent_2").
That was the easy part. But how can I write the macro which contains the forward and public for the pickup type function?
I want to define my pickup type function in this way:
Code:
PickupEvent:HOUSE(playerID, pickupID)
Code:
forward PickupEvent_1(playerID, pickupID); public PickupEvent_1(playerID, pickupID)