23.04.2012, 22:21
(
Последний раз редактировалось ipsBruno; 23.04.2012 в 22:55.
)
pawn Код:
/*
* GetMaxVehicles
* Get numbers of vehicles created
*/
new
totalVeh = -1;
#define CreateVehicle totalVeh ++, InternalCVeh
#define DestroyVehicle totalVeh --, InternalDVeh
#define GetMaxVehicles() totalVeh
forward InternalCVeh(modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay);
public InternalCVeh(modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay) {
return CallRemoteFunction("CreateVehicle", "dffffiid", modelid, x, y, z, angle, color1, color2, respawn_delay);
}
forward InternalDVeh(id);
public InternalDVeh(id) {
return CallRemoteFunction("DestroyVehicle", "i", id);
}
// Now, make to CreateVehicleEx. etc

